Public report — Grace, published 6 Aug 2026. Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version; ask the repo owner for the full report.
Watchdog 06-08-2026 @ 03:46 UTC Public
Code Health Audit

ScottArbeit/Grace

67% Strong
CriticalWeakAdequateStrongExemplary
upper third — near Strong

Hobby · 913 LoC · 2 projects · weakest lens: Readiness (60%)

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

58/63dimensions tool-verifieddeterministic · confidence 1.0 · 5 LLM-assisted, advisory
822findings with an exact file:lineof 830 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
63/107dimensions across the health lenses913 LoC · 2 projects — wide & deep

Executive summary

Read through the Preview lens: this repo is pre-1.0 / in development, so the colour bands are relaxed to what a preview needs — *green* means good enough for a preview, not yet production-stable. Code correctness and security stay near-strict even here; the score itself is absolute and comparable across repos.

ScottArbeit/Grace is in good overall health (67%), but at least one category below sits in Adequate-or-worse territory — most items are improvements, and the weakest category contains work to schedule, not shelve.

It is strongest in Architecture (94%) — the structure is clean and changes stay contained. Maturity (89%) is solid too.

The area that most needs attention is Readiness (60%) — releases are harder to depend on — versioning, release notes and dependency hygiene are thin, so consumers can't easily tell what changed or trust an upgrade. Accessibility (69%) is the next concern — it raises ongoing delivery and operational cost.

Leadership focus, highest impact first: The release job declares an environment (Deployment & Rollback); Keep a changelog (e.g. Keep-a-Changelog) recording what shipped… (Release Hygiene); eslint as package.json scripts and run them in CI (Tooling).

For scale: Hobby (~913 production lines); rebuilding it from scratch would take roughly ~1.2 person-years (~1–3 engineers). Approximate, ±~30%.

It builds on a genuinely strong Architecture foundation (94%); the priorities above are the highest-leverage way to bring the rest up to that level.

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Readiness 60% · 46% weightAccessibility 69% · 25% weightSecurity 71% · 14% weightCode Health 82% · 8% weightMaturity 89% · 4% weightArchitecture 94% · 2% weight

Raise Readiness 60 → 70 (the Healthy floor) ⇒ headline 67 → ~72.

Code composition — where the lines go
Business logic 1%Plumbing 0%Tests 99%
New since the last scan (100+)

331 finding(s) are new versus the previous scan (2026-08-01) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.

  • D1 · Text.apart (cyclomatic 169) src/Grace.Shared/Resources/Text/Languages.Resources.fs
  • D1 · Text.ago (cyclomatic 145) src/Grace.Shared/Resources/Text/Languages.Resources.fs
  • D1 · ManifestContributionDiagnosis.diagnoseWith (cyclomatic 144) src/Grace.Server/ManifestContributionDiagnosis.Server.fs
  • D1 · BranchActor.Grace.Actors.Interfaces.IBranchActor.Handle (cyclomatic 102) src/Grace.Actors/Branch.Actor.fs
  • D1 · PromotionSetActor.ComputeAppliedDirectoryVersionForStep (cyclomatic 75) src/Grace.Actors/PromotionSet.Actor.fs
  • D1 · DirectoryVersionActor.Grace.Actors.Interfaces.IDirectoryVersionActor.Handle (cyclomatic 50) src/Grace.Actors/DirectoryVersion.Actor.fs
  • D1 · UploadSession.decideCommand (cyclomatic 44) src/Grace.Actors/UploadSession.Actor.fs
  • D1 · RepositoryActor.Grace.Actors.Interfaces.IRepositoryActor.Handle (cyclomatic 43) src/Grace.Actors/Repository.Actor.fs
  • D1 · ManifestContributionRepairMeasurementTests.repair republication restores only the missing Reference root (cyclomatic 43) src/Grace.Server.Tests/ManifestContributionRepair.Measurement.Tests.fs
  • D1 · ManifestContributionRepair.buildPlan (cyclomatic 40) src/Grace.Server/ManifestContributionRepair.Server.fs
  • D1 · ManifestContributionRepair.reconcileCounterWith (cyclomatic 37) src/Grace.Server/ManifestContributionRepair.Server.fs
  • D1 · WorkItemActor.Grace.Actors.Interfaces.IWorkItemActor.Handle (cyclomatic 35) src/Grace.Actors/WorkItem.Actor.fs
  • D1 · Branch.rebaseHandler (cyclomatic 34) src/Grace.CLI/Command/Branch.CLI.fs
  • D1 · ApprovalRequest.decideCommand (cyclomatic 33) src/Grace.Actors/ApprovalRequest.Actor.fs
  • D1 · PromotionSetActor.ApplyPromotionSet (cyclomatic 33) src/Grace.Actors/PromotionSet.Actor.fs
  • D1 · ReferenceActor.Grace.Actors.Interfaces.IReferenceActor.Handle (cyclomatic 33) src/Grace.Actors/Reference.Actor.fs
  • D1 · ManifestContributionAccounting.handleReferenceCreatedWith (cyclomatic 33) src/Grace.Server/ManifestContributionAccounting.Server.fs
  • D1 · ManifestContributionRepair.removeStaleRelationshipWith (cyclomatic 32) src/Grace.Server/ManifestContributionRepair.Server.fs
  • D1 · ManifestContributionRedisRestartMeasurementTests.hot manifest converges one Reference after Redis restart (cyclomatic 32) src/Grace.Server.Tests/ManifestContributionRedisRestart.Measurement.Tests.fs
  • D1 · PromotionSetActor.RecomputeSteps (cyclomatic 31) src/Grace.Actors/PromotionSet.Actor.fs
  • D1 · DeadLetterRuntime.fixtureOwnsEvent (cyclomatic 31) src/Grace.Server.Tests/ManifestContributionDeadLetter.Measurement.Tests.fs
  • D1 · ContentBlockMetadata.mergeRanges (cyclomatic 30) src/Grace.Actors/ContentBlockMetadata.Actor.fs
  • D1 · ContentBlockMetadata.decideCommand (cyclomatic 30) src/Grace.Actors/ContentBlockMetadata.Actor.fs
  • D1 · ManifestContributionRepair.repairWith (cyclomatic 28) src/Grace.Server/ManifestContributionRepair.Server.fs
  • D1 · ManifestContributionWorkflow.decideCommandForKey (cyclomatic 27) src/Grace.Actors/ManifestContributionWorkflow.Actor.fs
  • D1 · PromotionSetActor.MaterializeMergedDirectoryVersion (cyclomatic 27) src/Grace.Actors/PromotionSet.Actor.fs
  • D1 · AnnotationLineCore.buildAnnotationWithTraversalBoundary (cyclomatic 27) src/Grace.Shared/AnnotationLineCore.Shared.fs
  • D1 · UploadSession.trySelectActiveContiguousRangeChain (cyclomatic 26) src/Grace.Actors/UploadSession.Actor.fs
  • D1 · ManifestContributionDuplicateBacklogMeasurementTests.isolated duplicate backlog completes exactly and preserves durable state (cyclomatic 26) src/Grace.Server.Tests/ManifestContributionDuplicateBacklog.Measurement.Tests.fs
  • D1 · OrganizationActor.Grace.Actors.Interfaces.IOrganizationActor.Handle (cyclomatic 25) src/Grace.Actors/Organization.Actor.fs
  • D1 · OwnerActor.Grace.Actors.Interfaces.IOwnerActor.Handle (cyclomatic 25) src/Grace.Actors/Owner.Actor.fs
  • D1 · Branch.createReferenceHandler (cyclomatic 25) src/Grace.CLI/Command/Branch.CLI.fs
  • D1 · UploadSession.tryCreateContentBlockMetadataMergeCommandsForFinalizedBlocks (cyclomatic 24) src/Grace.Actors/UploadSession.Actor.fs
  • D1 · ContentBlockMetadata.trySelectContiguousRangeEvidence (cyclomatic 23) src/Grace.Types/ContentBlockMetadata.Types.fs
  • D1 · ManifestContributionRepair.repairMissingRelationshipWith (cyclomatic 23) src/Grace.Server/ManifestContributionRepair.Server.fs
  • D1 · ManifestContributionDiagnosis.validateParameters (cyclomatic 23) src/Grace.Server/ManifestContributionDiagnosis.Server.fs
  • D1 · Create.InvokeAsync (cyclomatic 23) src/Grace.CLI/Command/Branch.CLI.fs
  • D1 · Repair.validateExecute (cyclomatic 23) src/Grace.Server.Unit.Tests/ManifestContributionMeasurement.fs
  • D1 · DeadLetterRuntime.inventoryDefaultReferenceProducerAsync (cyclomatic 23) src/Grace.Server.Tests/ManifestContributionDeadLetter.Measurement.Tests.fs
  • D1 · UploadSessionActor.Grace.Actors.Interfaces.IUploadSessionActor.Handle (cyclomatic 22) src/Grace.Actors/UploadSession.Actor.fs
  • D1 · UploadSessionActor.PrevalidateFinalizedContentBlockMetadata (cyclomatic 22) src/Grace.Actors/UploadSession.Actor.fs
  • D1 · PromotionSetActor.EnsureApprovalAllowsApply (cyclomatic 22) src/Grace.Actors/PromotionSet.Actor.fs
  • D1 · ManifestContributionServerRestartMeasurementTests.isolated persisted envelope completes after Grace Server restart (cyclomatic 22) src/Grace.Server.Tests/ManifestContributionServerRestart.Measurement.Tests.fs
  • D1 · Services.getReminders (cyclomatic 21) src/Grace.Actors/Services.Actor.fs
  • D1 · PromotionSetConflictModel.tryParseModelResponse (cyclomatic 21) src/Grace.Types/PromotionSet.Types.fs
  • D1 · ContentBlockMetadata.findRangeEvidence (cyclomatic 21) src/Grace.Types/ContentBlockMetadata.Types.fs
  • D1 · Branch.branchSwitchWatchCleanPreflightRefusalReason (cyclomatic 21) src/Grace.CLI/Command/Branch.CLI.fs
  • D1 · ManifestContributionGroupedMeasurementTests.grouped exact head run composes every accepted leaf (cyclomatic 21) src/Grace.Server.Tests/ManifestContributionGrouped.Measurement.Tests.fs
  • D1 · ManifestContributionBaselineMeasurementTests.isolated Baseline emits truthful completed evidence (cyclomatic 21) src/Grace.Server.Tests/ManifestContributionBaseline.Measurement.Tests.fs
  • D1 · RepositoryContentCounter.decideRepairForKey (cyclomatic 20) src/Grace.Actors/RepositoryContentCounter.Actor.fs
  • D1 · RepositoryContentCounter.handleWithRecentResult (cyclomatic 20) src/Grace.Actors/RepositoryContentCounter.Actor.fs
  • D1 · DuplicateBacklogRuntime.readSnapshotAsync (cyclomatic 20) src/Grace.Server.Tests/ManifestContributionDuplicateBacklog.Measurement.Tests.fs
  • D1 · DiffActor.Grace.Actors.Interfaces.IDiffActor.Compute (cyclomatic 19) src/Grace.Actors/Diff.Actor.fs
  • D1 · PromotionQueueActor.Grace.Actors.Interfaces.IPromotionQueueActor.Handle (cyclomatic 19) src/Grace.Actors/PromotionQueue.Actor.fs
  • D1 · ExactRelationshipKeyModule.validate (cyclomatic 19) src/Grace.Types/ManifestContributionAccounting.Types.fs
  • D1 · Annotation.validateLinkIntegrity (cyclomatic 19) src/Grace.Types/Annotation.Types.fs
  • D1 · ContentBlockFormat.decode (cyclomatic 19) src/Grace.Shared/ContentBlockFormat.Shared.fs
  • D1 · AspireTestHost.restartGraceServerWithEvidenceAsync (cyclomatic 19) src/Grace.Server.Tests/AspireTestHost.fs
  • D1 · ServerRestartRuntime.readSnapshotAsync (cyclomatic 19) src/Grace.Server.Tests/ManifestContributionServerRestart.Measurement.Tests.fs
  • D1 · Services.resolveOrganizationId (cyclomatic 18) src/Grace.Actors/Services.Actor.fs
  • D1 · Services.resolveRepositoryId (cyclomatic 18) src/Grace.Actors/Services.Actor.fs
  • D1 · Services.resolveBranchId (cyclomatic 18) src/Grace.Actors/Services.Actor.fs
  • D1 · DedupeIndex.contiguousActiveRanges (cyclomatic 18) src/Grace.Shared/DedupeIndex.Shared.fs
  • D1 · Branch.promotionHandler (cyclomatic 18) src/Grace.CLI/Command/Branch.CLI.fs
  • D1 · Branch.renderBranchStatus (cyclomatic 18) src/Grace.CLI/Command/Branch.CLI.fs
  • D1 · RepositoryActor.ApplyEvent (cyclomatic 17) src/Grace.Actors/Repository.Actor.fs
  • D1 · UploadSession.createRevalidatedClaimedMetadataMergeCommand (cyclomatic 17) src/Grace.Actors/UploadSession.Actor.fs
  • D1 · ContentBlockMetadata.createMergedMetadata (cyclomatic 17) src/Grace.Actors/ContentBlockMetadata.Actor.fs
  • D1 · Startup.ConfigureServices (cyclomatic 17) src/Grace.Server/Startup.Server.fs
  • D1 · BaselineRuntime.observeReferenceEnvelopesAsync (cyclomatic 17) src/Grace.Server.Tests/ManifestContributionBaseline.Measurement.Tests.fs
  • D1 · ContentBlockMetadata.adjustActiveManifestCount (cyclomatic 16) src/Grace.Actors/ContentBlockMetadata.Actor.fs
  • D1 · PromotionSetActor.ResolveConflictWithModel (cyclomatic 16) src/Grace.Actors/PromotionSet.Actor.fs
  • D1 · DirectoryVersion.convergePhysicalDeletionWith (cyclomatic 16) src/Grace.Actors/DirectoryVersion.Actor.fs
  • D1 · UsageFact.Validate (cyclomatic 16) src/Grace.Types/Usage.Types.fs
  • D1 · DedupeIndex.splitRangeIntoDedupeWindows (cyclomatic 16) src/Grace.Shared/DedupeIndex.Shared.fs
  • D1 · AnnotationLineCore.buildLineAlignmentRange (cyclomatic 16) src/Grace.Shared/AnnotationLineCore.Shared.fs
  • D1 · ManifestContributionDeadLetterMeasurementTests.isolated broker witness reaches dead-letter delivery eleven (cyclomatic 16) src/Grace.Server.Tests/ManifestContributionDeadLetter.Measurement.Tests.fs
  • D2 · PromotionSetActor.ComputeAppliedDirectoryVersionForStep (cognitive 291) src/Grace.Actors/PromotionSet.Actor.fs
  • D2 · ManifestContributionDiagnosis.diagnoseWith (cognitive 224) src/Grace.Server/ManifestContributionDiagnosis.Server.fs
  • D2 · Text.apart (cognitive 185) src/Grace.Shared/Resources/Text/Languages.Resources.fs
  • D2 · Text.ago (cognitive 159) src/Grace.Shared/Resources/Text/Languages.Resources.fs
  • D2 · Branch.rebaseHandler (cognitive 148) src/Grace.CLI/Command/Branch.CLI.fs
  • D2 · BranchActor.Grace.Actors.Interfaces.IBranchActor.Handle (cognitive 94) src/Grace.Actors/Branch.Actor.fs
  • D2 · ManifestContributionAccounting.handleReferenceCreatedWith (cognitive 90) src/Grace.Server/ManifestContributionAccounting.Server.fs
  • D2 · DirectoryVersionActor.Grace.Actors.Interfaces.IDirectoryVersionActor.Handle (cognitive 85) src/Grace.Actors/DirectoryVersion.Actor.fs
  • D2 · PromotionSetActor.RecomputeSteps (cognitive 80) src/Grace.Actors/PromotionSet.Actor.fs
  • D2 · PromotionSetActor.ApplyPromotionSet (cognitive 68) src/Grace.Actors/PromotionSet.Actor.fs
  • D2 · DeadLetterRuntime.inventoryDefaultReferenceProducerAsync (cognitive 64) src/Grace.Server.Tests/ManifestContributionDeadLetter.Measurement.Tests.fs
  • D2 · ManifestContributionRepair.repairWith (cognitive 61) src/Grace.Server/ManifestContributionRepair.Server.fs
  • D2 · ManifestContributionRepair.buildPlan (cognitive 59) src/Grace.Server/ManifestContributionRepair.Server.fs
  • D2 · UploadSession.decideCommand (cognitive 56) src/Grace.Actors/UploadSession.Actor.fs
  • D2 · UploadSessionActor.Grace.Actors.Interfaces.IUploadSessionActor.Handle (cognitive 55) src/Grace.Actors/UploadSession.Actor.fs
  • D2 · UploadSession.tryCreateContentBlockMetadataMergeCommandsForFinalizedBlocks (cognitive 54) src/Grace.Actors/UploadSession.Actor.fs
  • D2 · ContentBlockFormat.decode (cognitive 54) src/Grace.Shared/ContentBlockFormat.Shared.fs
  • D2 · ManifestContributionWorkflow.decideCommandForKey (cognitive 53) src/Grace.Actors/ManifestContributionWorkflow.Actor.fs
  • D2 · Branch.promotionHandler (cognitive 50) src/Grace.CLI/Command/Branch.CLI.fs
  • D2 · UploadSessionActor.PrevalidateFinalizedContentBlockMetadata (cognitive 48) src/Grace.Actors/UploadSession.Actor.fs
  • D2 · DedupeIndex.recordsAfterFinalize (cognitive 47) src/Grace.Shared/DedupeIndex.Shared.fs
  • D2 · BaselineRuntime.observeReferenceEnvelopesAsync (cognitive 46) src/Grace.Server.Tests/ManifestContributionBaseline.Measurement.Tests.fs
  • D2 · Branch.createReferenceHandler (cognitive 44) src/Grace.CLI/Command/Branch.CLI.fs

A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.

Rebuild cost & value ~ Modeled — €57,000–€290,000
Cost to rebuild€57,000–€290,000 (0.6–1.8 person-years (943–3,005 h), ~1–3 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.9× (at 67% quality) — the last 20% of quality is most of the work
Size & shapeHobby · 11% boilerplate · 12% straight-line · 78% branching logic

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.2) — high decision density × a 0.9× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
The release job declares an environment, but its protection rules are not visible from the repository — confirm required reviewers are attached, or publish as a draft release so a bad build can be stopped before users can download it.
+7.1 pts · Medium effort · Deployment & Rollback
2
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
+7.1 pts · Medium effort · Release Hygiene
3
Add eslint as package.json scripts and run them in CI.
+7.0 pts · Medium effort · Tooling

Diagnosis — what's actually going on

The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 3–10 engineer-days once. Not doing it costs about 163.6–981.9 engineer-days every year, paid as drag on the ~1,427,746 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–2 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 5–10% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 352,047 line(s) changed over a 90-day window ⇒ ~1,427,746/year · D1/D2/D4 code quality: averaging 6.2/10 ⇒ a 5–10% drag on each change · top-ranked remediation: Medium effort ⇒ about 3–10 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: The release job declares an environment, but its protection rules are not visible from the repository — confirm required reviewers are attached, or publish as a draft release so a bad build can be stopped before users can download it. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ The release job declares an environment, but its protection rules are not visible from the repository — confirm required reviewers are attached, or publish as a draft release so a bad build can be stopped before users can download it.

Architecture — module dependency matrix

746 modules, 788 dependencies — 1 dependency cycle, shown as the red cell(s) above the diagonal. Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)

(global)…annotation_line_range…i_probe.api.diffs_api…e.api.directories_api…api.organizations_api…_probe.api.owners_api….api.repositories_api…robe.api.webhooks_api…be.apis.configuration…odels.approval_policy…dels.approval_request…branch_dto_updated_at…onfirmed_block_upload….models.content_block…val_policy_parameters…est_upload_parameters…models.repository_dto…e.models.webhook_rule…be.apis.approvals_api…robe.apis.default_api…_probe.apis.diffs_api….apis.directories_api…pis.organizations_api…probe.apis.owners_api…apis.repositories_api…obe.apis.webhooks_api…ile_content_reference…dels.organization_dto…robe.models.owner_dto…ls.upload_session_dto…obe.api.approvals_api…probe.api.default_api…s.annotate_parameters…ch_annotation_api_dto…e.models.file_version…els.reference_api_dto…obe.apis.branches_api…models.branch_api_dto…els.directory_version…robe.api.branches_api(global)1…annotation_line_range2…i_probe.api.diffs_api3…e.api.directories_api4…api.organizations_api5…_probe.api.owners_api6….api.repositories_api7…robe.api.webhooks_api8…be.apis.configuration9…odels.approval_policy10…dels.approval_request11…branch_dto_updated_at12…onfirmed_block_upload13….models.content_block14…val_policy_parameters15…est_upload_parameters16…models.repository_dto17…e.models.webhook_rule18…be.apis.approvals_api19…robe.apis.default_api20…_probe.apis.diffs_api21….apis.directories_api22…pis.organizations_api23…probe.apis.owners_api24…apis.repositories_api25…obe.apis.webhooks_api26…ile_content_reference27…dels.organization_dto28…robe.models.owner_dto29…ls.upload_session_dto30…obe.api.approvals_api31…probe.api.default_api32…s.annotate_parameters33…ch_annotation_api_dto34…e.models.file_version35…els.reference_api_dto36…obe.apis.branches_api37…models.branch_api_dto38…els.directory_version39…robe.api.branches_api402111111111111111111121111112111111111111111111+706 more modules (most-connected shown)

At a glance — Code Health · 82% · Adequate · gated by D2

At a glance — Architecture · 94% · Adequate · gated by D26

At a glance — Maturity · 89% · Exemplary

At a glance — Readiness · 60% · Adequate

At a glance — Security · 71% · Adequate · gated by D29

At a glance — Accessibility · 69% · Strong

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A03:2021 — Injection13High / Critical
A05:2021 — Security Misconfiguration4High / Critical
A06:2021 — Vulnerable & Outdated Components1Medium

Roadmap

First, secure the deployment process by verifying reviewer assignments or publishing as a draft release to prevent bad builds from reaching users. Next, maintain a changelog to track release history and add eslint to package.json scripts for automated linting in CI. Then, enable purge protection and soft-delete on critical resources to prevent accidental or malicious data loss. Finally, improve code coverage to ensure greater reliability and safety.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
The release job declares an environment, but its protection rules are not visible from the repository — confirm required reviewers are attached, or publish as a draft release so a bad build can be stopped before users can download it.+7.1 ptsMediumDeployment & Rollback
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.+7.1 ptsMediumRelease Hygiene
Add eslint as package.json scripts and run them in CI.+7.0 ptsMediumTooling
Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.+6.8 ptsMediumDR & Backup
Improve Code Coverage — currently 8.9/10.+4.7 ptsMediumCode Coverage
Add tests that import the unreached modules (directly or through their public entry).+4.7 ptsMediumTest Coverage
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.+3.0 ptsMediumText alternatives
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.+3.0 ptsMediumA11y enforcement

File quality

Per-file score 0–10 — a quality signature. Of 148 files carrying findings, judged against the Preview bar: 0% slop · 5% mixed · 95% near-clean.

FileScoreBandWorst signal
src/Grace.Server/Dockerfile3.0MixedIaC & Container Security: High IaC: DS-0002
src/.github/workflows/deploy-to-app-service.yml4.4MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
src/Grace.Actors/Owner.Actor.fs5.6MixedCyclomatic Complexity: OwnerActor.Grace.Actors.Interfaces.IOwnerActor.Handle (cyclomatic 25)
.github/workflows/dotnet.yml5.8MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
.github/workflows/validate.yml5.8MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
sdk/generated/matrix/openapi-generator/python/.github/workflows/python.yml5.8MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
src/Grace.Aspire.AppHost/Program.Aspire.AppHost.cs6.0MixedExplicit Debt: BarePragmaDisable
src/Grace.CLI/Command/Watch.CLI.fs7.0Near-cleanCyclomatic Complexity: Watch.processChangedFilesWithClients (cyclomatic 84)
src/Grace.Actors/PromotionSet.Actor.fs7.0Near-cleanCyclomatic Complexity: PromotionSetActor.ComputeAppliedDirectoryVersionForStep (cyclomatic 75)
src/Grace.Actors/DirectoryVersion.Actor.fs7.0Near-cleanCyclomatic Complexity: DirectoryVersionActor.Grace.Actors.Interfaces.IDirectoryVersionActor.Handle (cyclomatic 50)
src/Grace.Actors/UploadSession.Actor.fs7.0Near-cleanCyclomatic Complexity: UploadSession.decideCommand (cyclomatic 44)
src/Grace.CLI/LocalStateDb.CLI.fs7.0Near-cleanCyclomatic Complexity: LocalStateDb.hasRequiredWatchJournalShape (cyclomatic 42)
src/Grace.Server/ManifestContributionRepair.Server.fs7.0Near-cleanCyclomatic Complexity: ManifestContributionRepair.buildPlan (cyclomatic 40)
src/Grace.CLI/Command/Reference.CLI.fs7.0Near-cleanCyclomatic Complexity: Reference.createReferenceHandler (cyclomatic 38)
src/Grace.CLI/Command/Diff.CLI.fs7.0Near-cleanCyclomatic Complexity: Diff.diffToReferenceType (cyclomatic 36)
src/Grace.CLI/Command/Branch.CLI.fs7.0Near-cleanCyclomatic Complexity: Branch.rebaseHandler (cyclomatic 34)
src/Grace.CLI/Command/Agent.CLI.fs7.0Near-cleanCyclomatic Complexity: AgentCommand.workStopWith (cyclomatic 31)
src/Grace.Actors/ContentBlockMetadata.Actor.fs7.0Near-cleanCyclomatic Complexity: ContentBlockMetadata.mergeRanges (cyclomatic 30)
src/Grace.Server/Storage.Server.fs7.0Near-cleanCyclomatic Complexity: Storage.ConfirmContentBlockUpload (cyclomatic 29)
src/Grace.CLI/Command/Repository.CLI.fs7.0Near-cleanCyclomatic Complexity: Repository.initHandler (cyclomatic 29)

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 58 of 63 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 5 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.7 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 63 dimensions across the health lenses
D1D2D3D4D5D7D8D13D14D15D16D17D19D20D21D24D26D27D28D29D30D31D33D34D35D37D38AC1AC2AC3AC5AC6AC7AX10AX3AX4AX5AX9GD1IC1M1M2M3M4P1P3P4P5P6R1R10R2R3R4R5R6R7R8R9X1X3X4X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 822 of 830 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
jscpdCode duplication✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.302✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.302✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 019fd52d-f48d-722e-ab42-dd2255e7656f.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

A clean run — every tool resolved and ran, and every applicable dimension was measured at full confidence. No scanner was unavailable, no analysis timed out or crashed, and nothing fell back to a degraded estimate.

When something does degrade — a missing scanner, a shallow clone, an LLM hiccup — it is named here explicitly and its exact cause recorded in diagnostics.md, never absorbed silently into the score.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity (jscpd) — it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D7 Architectural Integrity: Layering is checked against detected/declared rules — an architecture whose boundaries live in convention or in code review, not in a rule a scanner can read, is not enforced here.
  • D8 Code Coverage: Coverage is measured by building and running the test suite inside Watchdog's isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D24 Comment Value: Comment value (WHY vs WHAT) is an LLM judgement over a bounded sample — it is advisory and cannot weigh a comment against the precise code change it was written to explain.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and the advisory database — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D33 JS/npm Dependency Vulnerabilities: JS/npm CVE matching reads package manifests and lockfiles — risk from how a dependency is used, and advisories not yet published, fall outside this scan.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A clean result is "no unlabelled native control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

The LLM boundary

LLM-set scores this run (5): D19, D20, D21, D24, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.

Dimensions

D1 · Cyclomatic Complexity5.5 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: DocumentedVerifiedPrevented · effective 5.5 / 10 · rule-coverage 100% · ceiling Prevented

158 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Text.apart at 169. A further 22 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being en_US.getString at 147 — they are counted neither in the figure above nor in this dimension's score.

Text.apart (cyclomatic 169)src/Grace.Shared/Resources/Text/Languages.Resources.fs:336
Doctor.resultForCheck (cyclomatic 146)src/Grace.CLI/Command/Doctor.CLI.fs:888
Text.ago (cyclomatic 145)src/Grace.Shared/Resources/Text/Languages.Resources.fs:167
ManifestContributionDiagnosis.diagnoseWith (cyclomatic 144)src/Grace.Server/ManifestContributionDiagnosis.Server.fs:338
BranchActor.Grace.Actors.Interfaces.IBranchActor.Handle (cyclomatic 102)src/Grace.Actors/Branch.Actor.fs:570

+ 153 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 1 Text.apart (cyclomatic 169) finding(s) in Cyclomatic Complexity — start with Languages.Resources.fs. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Doctor.resultForCheck (cyclomatic 146) finding(s) in Cyclomatic Complexity — start with Doctor.CLI.fs. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Text.ago (cyclomatic 145) finding(s) in Cyclomatic Complexity — start with Languages.Resources.fs. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity3.7 / 10Weak✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: DocumentedVerifiedPrevented · effective 3.7 / 10 · rule-coverage 100% · ceiling Prevented

288 method(s) exceeded the cognitive complexity threshold of 15; the worst was Watch.processChangedFilesWithClients at 293.

Create.InvokeAsync (cognitive 20) · ×3src/Grace.CLI/Command/Repository.CLI.fs:292
Watch.processChangedFilesWithClients (cognitive 293)src/Grace.CLI/Command/Watch.CLI.fs:8335
PromotionSetActor.ComputeAppliedDirectoryVersionForStep (cognitive 291)src/Grace.Actors/PromotionSet.Actor.fs:1135
ManifestContributionDiagnosis.diagnoseWith (cognitive 224)src/Grace.Server/ManifestContributionDiagnosis.Server.fs:338
Watch.processCurrentBranchMaterializationNotification (cognitive 220)src/Grace.CLI/Command/Watch.CLI.fs:6430

+ 281 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 3 Create.InvokeAsync (cognitive 20) finding(s) in Cognitive Complexity — start with Repository.CLI.fs, Organization.CLI.fs, Owner.CLI.fs. — One of this dimension's main actionable groups (3 warning-level).
  2. Resolve the 1 Watch.processChangedFilesWithClients (cognitive 293) finding(s) in Cognitive Complexity — start with Watch.CLI.fs. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 PromotionSetActor.ComputeAppliedDirectoryVersionForStep (cognitive 291) finding(s) in Cognitive Complexity — start with PromotionSet.Actor.fs. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.9 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: DocumentedVerifiedPrevented · effective 8.9 / 10 · rule-coverage 100% · ceiling Prevented

66 god class(es) detected.

FileTooLong: Command/Watch.CLI.fs · ×44src/Grace.CLI/Command/Watch.CLI.fs:0
TooManyMethods: Watch · ×21src/Grace.CLI/Command/Watch.CLI.fs:50
ClassTooLong: Programsrc/Grace.Aspire.AppHost/Program.Aspire.AppHost.cs:0

What to do

  1. Resolve the 44 FileTooLong finding(s) in God Classes — start with Watch.CLI.fs, Branch.CLI.fs, Services.CLI.fs. — One of this dimension's main actionable groups (44 warning-level).
  2. Resolve the 21 TooManyMethods finding(s) in God Classes — start with Watch.CLI.fs, Services.CLI.fs, Services.Actor.fs. — One of this dimension's main actionable groups (21 warning-level).
  3. Resolve the 1 ClassTooLong finding(s) in God Classes — start with Program.Aspire.AppHost.cs. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication9.4 / 10Exemplary✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: DocumentedVerifiedPrevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Verified

267 duplicated block group(s) detected.

Duplicated block (13 lines × 2) · ×22src/Grace.Actors/Services.Actor.fs:1460
Duplicated block (12 lines × 2) · ×21src/Grace.Actors/Services.Actor.fs:958
Duplicated block (10 lines × 2) · ×21src/Grace.Actors/Services.Actor.fs:2882
Duplicated block (14 lines × 2) · ×19src/Grace.Actors/Interfaces.Actor.fs:540
Duplicated block (15 lines × 2) · ×18src/Grace.Actors/Owner.Actor.fs:169

+ 51 more group(s) — more in Appendix A; the complete list is findings.md.

✓ On the Gold path — maintain.

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

2 projects, 0 dependency cycle(s), 0 unstable depended-on project(s).

✓ On the Gold path — maintain.

Detailed fixes: d5_recommendation.md.

D7 · Architectural Integrity10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the code respects its intended layering / architecture rules.

Method: Enforcement rung (Prevented/Verified/Documented) per checkable ADR via Roslyn, plus dependency cycles via the engine shared with D5/AX3. Deterministic, exact.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Of 8 mechanizable ADRs, 5 are prevented by analyzers, 3 by tests, 0 exist only in prose. Coverage: 100 %. Cycles found: 0.

✓ On the Gold path — maintain.

Detailed fixes: d7_recommendation.md.

D8 · Code Coverage8.9 / 10Strong✓ Tool-verified

What it measures: How much of the code is actually exercised by tests.

Method: Coverage from coverlet runs or committed reports (Cobertura/OpenCover/lcov), computed per-file with structured exclusions for generated, trivial, and glue code. When the suite can't be built/run in-image AND no report is committed, coverage is reported NOT-MEASURED (excluded from the score) with the precondition to make it measurable — never a LoC-ratio proxy folded in as if measured. Deterministic.

Maturity: DocumentedVerifiedPrevented · effective 8.9 / 10 · rule-coverage 100% · ceiling Verified

Line coverage 53.5%, branch coverage 30.5%.

What to do

  1. Improve Code Coverage — currently 8.9/10. — Line coverage 53.5%, branch coverage 30.5%.

Detailed fixes: d8_recommendation.md.

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 16 packages use a banned license.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.2 / 10Exemplary✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: DocumentedVerifiedPrevented · effective 9.2 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: src/Grace.CLI/Command/Watch.CLI.fs (182×84=15288); src/Grace.CLI/Command/Doctor.CLI.fs (27×146=3942); src/Grace.CLI/Program.CLI.fs (24×92=2208)

Hotspot: src/Grace.CLI/Command/Watch.CLI.fs · ×10src/Grace.CLI/Command/Watch.CLI.fs

✓ On the Gold path — maintain.

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor9.0 / 10Strong✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: DocumentedVerifiedPrevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Documented

184 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/Grace.CLI/Command/Watch.CLI.fs.

Small-team knowledge concentration

What to do

  1. Resolve the 1 Small-team knowledge concentration finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt8.2 / 10Strong✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: DocumentedVerifiedPrevented · effective 8.2 / 10 · rule-coverage 100% · ceiling Prevented

3 deducted debt markers + 0 dead symbols across 798 LoC (0.9/KLoC) → score 8.2.

NoWarnInCsproj · ×2src/Grace.Orleans.CodeGen/Grace.Orleans.CodeGen.csproj:12
BarePragmaDisablesrc/Grace.Aspire.AppHost/Program.Aspire.AppHost.cs:225

What to do

  1. Resolve the 2 NoWarnInCsproj finding(s) in Explicit Debt — start with Grace.Orleans.CodeGen.csproj, Directory.Build.props. — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 BarePragmaDisable finding(s) in Explicit Debt — start with Program.Aspire.AppHost.cs. — One of this dimension's main actionable groups (1 warning-level).
  3. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality / 10Exemplary◐ Sampled · advisory

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

Maturity: DocumentedVerifiedPrevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

Grace's documentation is clear and complete, with a strong README that introduces the system as an AI-era version control tool designed for kindness and velocity. The architecture section (server, event sourcing, object storage, watch, continuous review) is well written alongside a detailed roadmap and GUI proposal. A dedicated SDK monorepo guide covers facade-first layout, generator harness, and proof lanes with provenance tables, while the protocol docs explain content-addressed vectors, deterministic contracts, and identity boundaries for portable implementations. The TypeScript Node SDK README gives install/import examples, Tier 2 file transfer helpers, and transport defaults, plus a generated OpenAPI probe client that is itself well documented. Despite being clipped mid-sentence in several files (e.g., the Rust proof lane), every named section exists and is present in the outline; no missing content to flag. Grace's documentation is clear, complete, and well-structured across READMEs, architecture/design docs, and XML coverage. The grace-generated-openapi-probe Python package README explains the generated OpenAPI spec with helpful hints (Id/name preference, CorrelationId convention, name regex), requirements, pip install, and a detailed CLI workflow example for workitem creation and status updates. Work items.md covers canonical commands/aliases, the full list of POST routes under /work, and a clipped but fully outlined CLI workflows section plus Create and inspect work items; Link references/promotion sets; Attach summary/prompt/note content; Retrieve reviewer attachments; Inspect/clean up links; SDK example (F#); Current limitations. Why Grace isn't just a version control system is well written with concrete new-circumstances reasoning, and Why Auto-Rebase isn't a problem explains branching design decisions and the no-loss guarantee of auto-rebase. The final audit traces validation coverage across OpenAPI/generated artifacts and records status vocabulary for implemented/pending/deferred items. Despite being clipped in several places (e.g., the workitem-create PowerShell example ends at '…(clipped here by the scanner'), all outlined sections are present, so no section is flagged as missing. Grace's documentation is exceptionally clear and complete for a project of this size: 12 README-style files plus 755 architecture/design docs cover the routing contract audit, CAS integration audit, OpenAPI/SDK architecture specification, proof scaffolding, and final audit across storage pool, SDK/OpenAPI, and the epic-to-main release. The XML-doc coverage is zero for Grace.Aspire.AppHost (0%) but perfect at the codegen layer (Grace.Orleans.CodeGen 0/0), reflecting a focused documentation strategy where only the most critical surfaces are exposed as XML docs.

XML-doc coverage: Grace.Aspire.AppHost · ×2src/Grace.Aspire.AppHost/Grace.Aspire.AppHost.csproj

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.

D20 · ADR Quality / 10Exemplary◐ Sampled · advisory

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: DocumentedVerifiedPrevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

Evaluated 10 ADR(s) individually; mean quality 9.7/10 (consistently complete and clear). 0 flagged with a specific gap.

✓ On the Gold path — maintain.

Detailed fixes: d20_recommendation.md.

D21 · Naming Consistency / 10Exemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

Maturity: DocumentedVerifiedPrevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 30 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D24 · Comment Value / 10Strong◐ Sampled · advisory

What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).

Method: Judged by language model at low temperature (0.0-0.1) on deterministically sampled inline comments with surrounding code; findings verified back to sampled comments by substring match. Advisory, sampled.

Maturity: DocumentedVerifiedPrevented · effective Strong / 10 · rule-coverage 100% · ceiling Documented

12 valuable / 1 redundant across 34 sampled comments; 1 shown with locations.

redundant commentsrc/Grace.Aspire.AppHost/Program.Aspire.AppHost.cs:87

What to do

  1. Resolve the 1 redundant comment finding(s) in Comment Value — start with Program.Aspire.AppHost.cs. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d24_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion0.0 / 10Critical✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic, LLM-independent.

Maturity: DocumentedVerifiedPrevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

2 of 2 projects flagged as possibly oversized/incoherent.

Split Grace.Aspire.AppHost
Split Grace.Orleans.CodeGen

What to do

  1. Resolve the 1 Split Grace.Aspire.AppHost finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 Split Grace.Orleans.CodeGen finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D27 · Navigability9.8 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

Maturity: DocumentedVerifiedPrevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Documented

80 % of calls cross a namespace and 4 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)6.0 / 10Adequate✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: Git-history secret scan via gitleaks detect over full history in an isolated checkout; each match flagged High. Exhaustive; degrades cleanly when tool absent.

Maturity: DocumentedVerifiedPrevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Documented

4 finding(s): 0 critical, 4 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

What to do

  1. Improve Secrets (history) — currently 6.0/10. — 4 finding(s): 0 critical, 4 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

Detailed fixes: d28_recommendation.md.

D29 · Static Analysis (SAST)1.1 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: DocumentedVerifiedPrevented · effective 1.1 / 10 · rule-coverage 100% · ceiling Documented

13 finding(s): 0 critical, 13 high, 0 medium, 0 low.

High: github-actions-mutable-action-tag · ×13.github/workflows/dotnet.yml:20detected by semgrep finding

What to do

  1. Resolve the 13 High finding(s) in Static Analysis (SAST) — start with deploy-to-app-service.yml (7), dotnet.yml (2), validate.yml (2). — One of this dimension's main actionable groups (13 issue-level).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether any dependencies have known published vulnerabilities (CVEs), direct or transitive.

Method: NuGet CVE scan via dotnet list package --vulnerable including transitive; severity tally (Critical/High/Medium/Low) to 0-10 tight normalizer. Exhaustive, deterministic; degrades when absent.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No known-vulnerable NuGet packages (direct or transitive).

✓ On the Gold path — maintain.

Detailed fixes: d30_recommendation.md.

D31 · IaC & Container Security8.9 / 10Strong✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (Dockerfile/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: DocumentedVerifiedPrevented · effective 8.9 / 10 · rule-coverage 100% · ceiling Documented

5 finding(s): 0 critical, 3 high, 1 medium, 1 low.

High IaC: DS-0002 · ×2src/Grace.Server/Dockerfiledetected by trivy finding
Medium IaC: CKV_DOCKER_3src/Grace.Server/Dockerfile:1detected by trivy finding
Low IaC: DS-0026src/Grace.Server/Dockerfiledetected by trivy finding

What to do

  1. Resolve the 2 High IaC finding(s) in IaC & Container Security — start with Dockerfile (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with Dockerfile. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 Low IaC finding(s) in IaC & Container Security — start with Dockerfile. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.

D33 · JS/npm Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether JavaScript/npm dependencies have known published vulnerabilities (CVEs) — the npm ecosystem's biggest risk.

Method: JS/npm CVE scan via trivy fs --scanners vuln over JS manifests (package.json/yarn.lock/pnpm-lock/bun.lockb); 0-10 tight normalizer. NotApplicable without JS manifests. Exhaustive, deterministic.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No known-vulnerable JS/npm dependencies.

✓ On the Gold path — maintain.

Detailed fixes: d33_recommendation.md.

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

2 of 436 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/Grace.Shared/Parameters/Reminder.Parameters.fs.

Further orphaned files (smaller)

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.3 / 10Exemplary✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling; coupling through a build step, config, or non-source file isn't seen.

Maturity: DocumentedVerifiedPrevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: EndpointAuthorizationManifest.Server.fs↔Startup.Server.fs 100%; Constants.Actor.fs↔Interfaces.Actor.fs 80%; OwnerName.Actor.fs↔RepositoryName.Actor.fs 77%

Change coupling: EndpointAuthorizationManifest.Server.fs ↔ Startup.Server.fs · ×10src/Grace.Server/Security/EndpointAuthorizationManifest.Server.fs

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D37 · Vulnerability-disclosure Policy4.0 / 10Weak✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

Maturity: DocumentedVerifiedPrevented · effective 4.0 / 10 · rule-coverage 100% · ceiling Documented

A vulnerability-disclosure policy (SECURITY.md) is present but only routes reports to a public channel (no private reporting contact).

Disclosure policy routes reports to a public channel

What to do

  1. Resolve the 1 Disclosure policy routes reports to a public channel finding(s) in Vulnerability-disclosure Policy. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d37_recommendation.md · top locations in Appendix A, every location in findings.md.

D38 · OSV Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether dependencies have known published vulnerabilities (CVEs) per the OSV database — read natively from whatever lockfile the repository ships (Cargo, npm, Go, Python, Maven, RubyGems, …). D33 and D30 add ecosystem-specific scanners on top for npm and .NET.

Method: Multi-ecosystem dependency-CVE scan via osv-scanner --recursive (queries the osv.dev database + parses lockfiles natively across ecosystems: npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven/Gradle pom.xml/gradle.lockfile, PyPI requirements.txt/poetry.lock/Pipfile.lock, Composer composer.lock, RubyGems Gemfile.lock, Hex mix.lock, pub pubspec.lock, Swift Package.resolved); severity tally (Critical/High/Medium/Low) to 0-10 tight normalizer (8.0). NotApplicable only when the repo declares no supported non-.NET dependency lockfile (a NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain); coverage needs a resolved lockfile. Additive to D33 (trivy fs); exhaustive + deterministic, DB kept fresh.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No known-vulnerable dependencies (OSV).

✓ On the Gold path — maintain.

Detailed fixes: d38_recommendation.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC1 · Text alternatives4.3 / 10Weak✓ Tool-verified

Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.

  • An svg presented as an image needs a name — add a <title> child or an aria-label/aria-labelledby. — Brain2DevelopmentProcess.html:0

What to do

  • Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

AC3 · Page structure10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.

AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

  • No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge.

What to do

  • Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code — check that business logic isn't leaking into the application/infrastructure layers (a thin domain is the anemic-domain smell).
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

IC1 · Incompleteness & stubs10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

M1 · Documentation (README)8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Add a README to the 2 of 2 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation8.5 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

What to do

  • Grow the ADR log (currently 10) — reach 20 to raise the maturity tier; document significant decisions as they're made.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P3 · Security & performance tooling4.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

What to do

  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

What to do

  • The release job declares an environment, but its protection rules are not visible from the repository — confirm required reviewers are attached, or publish as a draft release so a bad build can be stopped before users can download it.
P5 · DR & Backup7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
R1 · Type Safety9.8 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication10.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm over JS/TS tokens, D-386).

Method: Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm run over JS/TS tokens). Deterministic.

  • sdk/typescript/grace/src/protocol/content-address.ts:160 · sdk/typescript/grace/src/protocol/eligibility.ts:41 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — content-address.ts:160
  • sdk/typescript/grace/src/protocol/content-block.ts:257 · sdk/typescript/grace/src/protocol/content-block.ts:265 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — content-block.ts:257
  • sdk/typescript/grace/src/protocol/content-block.ts:269 · sdk/typescript/grace/src/protocol/content-block.ts:281 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — content-block.ts:269
R2 · Cyclomatic Complexity7.0 / 10Strong✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • Branch-heavy code is where defects cluster — extract decisions into smaller functions. (×2) — content-block.ts:98, manifest.ts:65

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files8.6 / 10Strong✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage8.9 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. — typescript-wire-proof.cjs

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness9.9 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D33 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D33). Deterministic.

What to do

  • Bump outdated dependencies to current versions to limit upgrade debt.
R6 · Tooling6.7 / 10Strong✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • test ✓ · lint ✗ · typecheck ✓

What to do

  • Add eslint as package.json scripts and run them in CI.
R7 · Dead Code10.0 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • 1 file(s) (~69 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package.
R8 · Dependency Hygiene10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X3 · Exception handling10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

X4 · Structured logging10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.

Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. Deterministic.

X5 · Nullable reference types10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

WCAG coverage — what static analysis assessed

Statically assessed 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

Not statically assessed — these 42 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.2.1, 1.2.3, 1.2.4, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.1, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health82%Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture94%Adequate — gated by D26Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity89%ExemplaryStrongest area.
Readiness60%AdequateLargest drag on the score — prioritise here.
Security71%Adequate — gated by D29Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility69%StrongSolid.
Not included — 44 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • AX6 Interface segregation — no public interfaces
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • D10 Test Quality — ~105518 lines of test source are present (.py, .fs, .mjs) but the test-quality collector reads C# only, so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included
  • D12 Dependency Hygiene — Dependency hygiene not measured — no packages were read
  • D18 Solution Shape — D18 scores the shape of a C#/VB .NET solution, but this repository's production source is mostly .fs, .py, .rs, .ts, which the C#/VB workspace does not load — the projects that loaded are an immaterial minority, so solution shape was not assessed for this repository. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D22 Internal API Consistency — No exposed public API
  • D23 Boundary Type-Coupling — At only 2 projects the codebase is small and single-purpose despite its high production size, so boundaries are not yet needed.
  • D25 ADR Conformance — none of 10 ADRs are conformance-checkable — unverifiable.
  • D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
  • D36 Supply-chain Provenance & Signing — The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release).
  • D39 IL Efficiency — The target did not build, so no IL was available to measure.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a C#/VB class graph, and this repository's production source is mostly .fs, .py, .rs, .ts, which this pass does not read, so cohesion was not assessed for this repository. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D9 Test Distribution — Test source is present (.py, .fs, .mjs) but the test-pyramid classifier reads C# only, so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 710 value object(s); 61 domain event(s)
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this check looks for
  • P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
  • P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
  • P8 Schema migrations — no EF Core usage detected
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (Cobertura — `dotnet test --collect:"XPlat Code Coverage"` with a `coverlet.collector` PackageReference) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • PF2 Allocation hygiene — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • PF3 Async & latency hygiene — Performance is assessed only for perf-relevant repos — a packaged library, one that ships benchmarks, or one already using allocation-aware APIs. This repo isn't one, so the Performance lens is not applicable and is excluded from the score.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X2 Cancellation propagation — no async methods found
  • X6 Hand-rolled structured-format parsing — Reported, not scored — this card publishes what it found rather than grading it. Its content is the findings and the key metric above.
  • X7 Silent fallback defaults — Reported, not scored — this card publishes what it found rather than grading it. Its content is the findings and the key metric above.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Issue — 17 finding(s)
D29 · Static Analysis (SAST) · High · ×13
  • High: github-actions-mutable-action-tag .github/workflows/dotnet.yml:20 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v6`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v6 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/dotnet.yml:22 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-dotnet@<40-character SHA>`. This step references `actions/setup-dotnet@v5`; resolve the SHA it points at today with `gh api repos/actions/setup-dotnet/commits/v5 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/validate.yml:24 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v6`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v6 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/validate.yml:26 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-dotnet@<40-character SHA>`. This step references `actions/setup-dotnet@v5`; resolve the SHA it points at today with `gh api repos/actions/setup-dotnet/commits/v5 --jq .sha`.
  • High: github-actions-mutable-action-tag sdk/generated/matrix/openapi-generator/python/.github/workflows/python.yml:22 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag sdk/generated/matrix/openapi-generator/python/.github/workflows/python.yml:24 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-python@<40-character SHA>`. This step references `actions/setup-python@v4`; resolve the SHA it points at today with `gh api repos/actions/setup-python/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag src/.github/workflows/deploy-to-app-service.yml:23 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v4`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag src/.github/workflows/deploy-to-app-service.yml:26 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-dotnet@<40-character SHA>`. This step references `actions/setup-dotnet@v4`; resolve the SHA it points at today with `gh api repos/actions/setup-dotnet/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag src/.github/workflows/deploy-to-app-service.yml:64 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v4`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag src/.github/workflows/deploy-to-app-service.yml:71 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v4`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag src/.github/workflows/deploy-to-app-service.yml:85 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/download-artifact@<40-character SHA>`. This step references `actions/download-artifact@v4`; resolve the SHA it points at today with `gh api repos/actions/download-artifact/commits/v4 --jq .sha`.
  • High: github-actions-mutable-action-tag src/.github/workflows/deploy-to-app-service.yml:91 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: azure/login@<40-character SHA>`. This step references `azure/login@v1`; resolve the SHA it points at today with `gh api repos/azure/login/commits/v1 --jq .sha`.
  • High: github-actions-mutable-action-tag src/.github/workflows/deploy-to-app-service.yml:98 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: azure/webapps-deploy@<40-character SHA>`. This step references `azure/webapps-deploy@v2`; resolve the SHA it points at today with `gh api repos/azure/webapps-deploy/commits/v2 --jq .sha`.
D17 · Explicit Debt · NoWarnInCsproj · ×2
  • NoWarnInCsproj src/Grace.Orleans.CodeGen/Grace.Orleans.CodeGen.csproj:12 — 1591 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
  • NoWarnInCsproj src/Directory.Build.props:33 — NETSDK1057 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
D31 · IaC & Container Security · High IaC · ×2
  • High IaC: DS-0002 src/Grace.Server/Dockerfile — Image user should not be 'root' A container that starts as root runs your process with root's capabilities inside the namespace, so a compromise of the process starts from there. The step: create an unprivileged account in the image (`RUN adduser --system --no-create-home app`), give it ownership of the paths the process writes at runtime (`COPY --chown=` on those layers, or a `RUN chown -R`), and end the final stage with `USER app` so it is the default at start. Build stages that only compile can stay root; it is the stage that RUNS that needs the account. If the process genuinely requires root — it manages the container runtime, ptraces another process or opens raw devices — say so here rather than making a change that breaks it.
  • High IaC: DS-0029 src/Grace.Server/Dockerfile — 'apt-get' missing '--no-install-recommends'
Warning — 801 finding(s)
D3 · God Classes · FileTooLong · ×44
  • FileTooLong: Command/Watch.CLI.fs src/Grace.CLI/Command/Watch.CLI.fs:0 — FileTooLong — 7109 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Command/Branch.CLI.fs src/Grace.CLI/Command/Branch.CLI.fs:0 — FileTooLong — 3904 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Command/Services.CLI.fs src/Grace.CLI/Command/Services.CLI.fs:0 — FileTooLong — 2924 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Grace.Actors/Services.Actor.fs src/Grace.Actors/Services.Actor.fs:0 — FileTooLong — 2785 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Grace.Server/Branch.Server.fs src/Grace.Server/Branch.Server.fs:0 — FileTooLong — 2153 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Grace.Server/Storage.Server.fs src/Grace.Server/Storage.Server.fs:0 — FileTooLong — 1884 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Grace.Actors/PromotionSet.Actor.fs src/Grace.Actors/PromotionSet.Actor.fs:0 — FileTooLong — 1781 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Grace.Server/Startup.Server.fs src/Grace.Server/Startup.Server.fs:0 — FileTooLong — 1618 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Grace.Actors/UploadSession.Actor.fs src/Grace.Actors/UploadSession.Actor.fs:0 — FileTooLong — 1601 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Command/Repository.CLI.fs src/Grace.CLI/Command/Repository.CLI.fs:0 — FileTooLong — 1587 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Grace.Actors/DirectoryVersion.Actor.fs src/Grace.Actors/DirectoryVersion.Actor.fs:0 — FileTooLong — 1377 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Grace.Server/WorkItem.Server.fs src/Grace.Server/WorkItem.Server.fs:0 — FileTooLong — 1365 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Command/Auth.CLI.fs src/Grace.CLI/Command/Auth.CLI.fs:0 — FileTooLong — 1341 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Grace.CLI/CommandOutputContract.CLI.fs src/Grace.CLI/CommandOutputContract.CLI.fs:0 — FileTooLong — 1264 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Grace.Server/Review.Server.fs src/Grace.Server/Review.Server.fs:0 — FileTooLong — 1200 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Grace.Server/Notification.Server.fs src/Grace.Server/Notification.Server.fs:0 — FileTooLong — 1175 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Grace.CLI/Program.CLI.fs src/Grace.CLI/Program.CLI.fs:0 — FileTooLong — 1102 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Command/Doctor.CLI.fs src/Grace.CLI/Command/Doctor.CLI.fs:0 — FileTooLong — 1085 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Command/Reference.CLI.fs src/Grace.CLI/Command/Reference.CLI.fs:0 — FileTooLong — 1070 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Command/WorkItem.CLI.fs src/Grace.CLI/Command/WorkItem.CLI.fs:0 — FileTooLong — 1016 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Grace.Actors/Branch.Actor.fs src/Grace.Actors/Branch.Actor.fs:0 — FileTooLong — 998 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Command/Access.CLI.fs src/Grace.CLI/Command/Access.CLI.fs:0 — FileTooLong — 979 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Command/Agent.CLI.fs src/Grace.CLI/Command/Agent.CLI.fs:0 — FileTooLong — 971 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Command/PromotionSet.CLI.fs src/Grace.CLI/Command/PromotionSet.CLI.fs:0 — FileTooLong — 966 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: Grace.Types/Common.Types.fs src/Grace.Types/Common.Types.fs:0 — FileTooLong — 909 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 19 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×22
  • Duplicated block (13 lines × 2) src/Grace.Actors/Services.Actor.fs:1460 — src/Grace.Actors/Services.Actor.fs:1460-1472 | src/Grace.Actors/Services.Actor.fs:1662-1674 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) src/Grace.Actors/Services.Actor.fs:1846 — src/Grace.Actors/Services.Actor.fs:1846-1859 | src/Grace.Actors/Services.Actor.fs:2119-2131 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Services.Actor.fs:1846` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13 lines × 2) src/Grace.Actors/Services.Actor.fs:1910 — src/Grace.Actors/Services.Actor.fs:1910-1925 | src/Grace.Actors/Services.Actor.fs:2100-2112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) src/Grace.Actors/Services.Actor.fs:2762 — src/Grace.Actors/Services.Actor.fs:2762-2774 | src/Grace.Actors/Services.Actor.fs:3076-3088 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Services.Actor.fs:2762` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/Grace.Actors/AccessControl.Actor.fs:1 — src/Grace.Actors/AccessControl.Actor.fs:1-13 | src/Grace.Actors/RepositoryPermission.Actor.fs:1-13 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (13 lines × 2) src/Grace.Actors/Reference.Actor.fs:967 — src/Grace.Actors/Reference.Actor.fs:967-979 | src/Grace.Actors/Branch.Actor.fs:1097-1109 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Reference.Actor.fs:967` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/Grace.Types/Artifact.Types.fs:223 — src/Grace.Types/Artifact.Types.fs:223-235 | src/Grace.Types/Artifact.Types.fs:297-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Types/Artifact.Types.fs:223` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/Grace.Server/AnnotationMaterialization.Server.fs:48 — src/Grace.Server/AnnotationMaterialization.Server.fs:48-60 | src/Grace.Server/NormalFileMaterialization.Server.fs:46-58 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13 lines × 2) src/Grace.Server/Queue.Server.fs:54 — src/Grace.Server/Queue.Server.fs:54-66 | src/Grace.Server/Queue.Server.fs:149-161 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Queue.Server.fs:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/Grace.Server/Queue.Server.fs:329 — src/Grace.Server/Queue.Server.fs:329-341 | src/Grace.Server/Queue.Server.fs:362-374 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Queue.Server.fs:329` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/Grace.CLI/LocalStateDb.CLI.fs:2969 — src/Grace.CLI/LocalStateDb.CLI.fs:2969-2981 | src/Grace.CLI/LocalStateDb.CLI.fs:3023-3035 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) src/Grace.CLI/Command/Owner.CLI.fs:190 — src/Grace.CLI/Command/Owner.CLI.fs:190-202 | src/Grace.CLI/Command/Organization.CLI.fs:228-240 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Owner.CLI.fs:190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/Grace.CLI/Command/Owner.CLI.fs:253 — src/Grace.CLI/Command/Owner.CLI.fs:253-265 | src/Grace.CLI/Command/Organization.CLI.fs:293-305 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Owner.CLI.fs:253` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/Grace.CLI/Command/Owner.CLI.fs:472 — src/Grace.CLI/Command/Owner.CLI.fs:472-484 | src/Grace.CLI/Command/Organization.CLI.fs:501-513 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Owner.CLI.fs:472` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/Grace.CLI/Command/Organization.CLI.fs:486 — src/Grace.CLI/Command/Organization.CLI.fs:486-498 | src/Grace.CLI/Command/Organization.CLI.fs:539-551 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Organization.CLI.fs:486` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:724 — src/Grace.CLI/Command/Branch.CLI.fs:724-736 | src/Grace.CLI/Command/Reference.CLI.fs:441-453 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:724` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (13 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:1565 — src/Grace.CLI/Command/Branch.CLI.fs:1565-1581 | src/Grace.CLI/Command/Reference.CLI.fs:1024-1036 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (13 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:2491 — src/Grace.CLI/Command/Branch.CLI.fs:2491-2503 | src/Grace.CLI/Command/Reference.CLI.fs:1310-1322 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:2491` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:2510 — src/Grace.CLI/Command/Branch.CLI.fs:2510-2522 | src/Grace.CLI/Command/Reference.CLI.fs:1329-1341 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (13 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:4971 — src/Grace.CLI/Command/Branch.CLI.fs:4971-4983 | src/Grace.CLI/Command/Reference.CLI.fs:1428-1440 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (13 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:5221 — src/Grace.CLI/Command/Branch.CLI.fs:5221-5233 | src/Grace.CLI/Command/Reference.CLI.fs:1496-1508 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (13 lines × 2) src/Grace.CLI/Command/Reference.CLI.fs:20 — src/Grace.CLI/Command/Reference.CLI.fs:20-32 | src/Grace.CLI/Command/DirectoryVersion.CLI.fs:21-33 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
D3 · God Classes · TooManyMethods · ×21
  • TooManyMethods: Watch src/Grace.CLI/Command/Watch.CLI.fs:50 — TooManyMethods — 528 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Services src/Grace.CLI/Command/Services.CLI.fs:46 — TooManyMethods — 173 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Services src/Grace.Actors/Services.Actor.fs:63 — TooManyMethods — 125 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Storage src/Grace.Server/Storage.Server.fs:44 — TooManyMethods — 92 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Branch src/Grace.Server/Branch.Server.fs:38 — TooManyMethods — 79 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Branch src/Grace.CLI/Command/Branch.CLI.fs:49 — TooManyMethods — 70 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: UploadSession src/Grace.Actors/UploadSession.Actor.fs:24 — TooManyMethods — 64 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Auth src/Grace.CLI/Command/Auth.CLI.fs:34 — TooManyMethods — 58 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WorkItem src/Grace.Server/WorkItem.Server.fs:33 — TooManyMethods — 56 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: DedupeIndex src/Grace.Shared/DedupeIndex.Shared.fs:15 — TooManyMethods — 52 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Utilities src/Grace.Shared/Utilities.Shared.fs:46 — TooManyMethods — 49 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MemoryCache src/Grace.Actors/Extensions/MemoryCache.Extensions.Actor.fs:13 — TooManyMethods — 47 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Doctor src/Grace.CLI/Command/Doctor.CLI.fs:24 — TooManyMethods — 46 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Common src/Grace.CLI/Command/Common.CLI.fs:29 — TooManyMethods — 45 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: PromotionSetActor src/Grace.Actors/PromotionSet.Actor.fs:317 — TooManyMethods — 42 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Branch src/Grace.SDK/Branch.SDK.fs:17 — TooManyMethods — 40 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Review src/Grace.Server/Review.Server.fs:31 — TooManyMethods — 40 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AnnotationLineCore src/Grace.Shared/AnnotationLineCore.Shared.fs:10 — TooManyMethods — 38 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: WorkItemCommand src/Grace.CLI/Command/WorkItem.CLI.fs:27 — TooManyMethods — 33 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: GraceCommand src/Grace.CLI/Program.CLI.fs:51 — TooManyMethods — 33 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CommandOutputContract src/Grace.CLI/CommandOutputContract.CLI.fs:8 — TooManyMethods — 32 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×21
  • Duplicated block (12 lines × 2) src/Grace.Actors/Services.Actor.fs:958 — src/Grace.Actors/Services.Actor.fs:958-969 | src/Grace.Actors/Services.Actor.fs:1044-1055 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) src/Grace.Actors/Services.Actor.fs:1821 — src/Grace.Actors/Services.Actor.fs:1821-1832 | src/Grace.Actors/Services.Actor.fs:2169-2181 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) src/Grace.Actors/Services.Actor.fs:1874 — src/Grace.Actors/Services.Actor.fs:1874-1885 | src/Grace.Actors/Services.Actor.fs:2061-2072 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Services.Actor.fs:1874` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) src/Grace.Actors/DirectoryVersion.Actor.fs:87 — src/Grace.Actors/DirectoryVersion.Actor.fs:87-99 | src/Grace.Actors/Reference.Actor.fs:269-280 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) src/Grace.Actors/ValidationSet.Actor.fs:1 — src/Grace.Actors/ValidationSet.Actor.fs:1-12 | src/Grace.Actors/ValidationResult.Actor.fs:1-12 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (12 lines × 2) src/Grace.Actors/ContentBlockMetadata.Actor.fs:120 — src/Grace.Actors/ContentBlockMetadata.Actor.fs:120-131 | src/Grace.Actors/UploadSession.Actor.fs:205-216 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) src/Grace.Actors/UploadSession.Actor.fs:871 — src/Grace.Actors/UploadSession.Actor.fs:871-882 | src/Grace.Actors/UploadSession.Actor.fs:1055-1066 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/UploadSession.Actor.fs:871` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) src/Grace.Types/ContentBlockMetadata.Types.fs:484 — src/Grace.Types/ContentBlockMetadata.Types.fs:484-495 | src/Grace.Types/ContentBlockMetadata.Types.fs:523-534 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) src/Grace.Server/Security/AuthorizationMiddleware.Server.fs:125 — src/Grace.Server/Security/AuthorizationMiddleware.Server.fs:125-136 | src/Grace.Server/Security/AuthorizationMiddleware.Server.fs:203-214 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Security/AuthorizationMiddleware.Server.fs:125` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) src/Grace.Server/Branch.Server.fs:2492 — src/Grace.Server/Branch.Server.fs:2492-2503 | src/Grace.Server/Branch.Server.fs:2603-2615 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) src/Grace.Server/ApprovalPolicy.Server.fs:214 — src/Grace.Server/ApprovalPolicy.Server.fs:214-225 | src/Grace.Server/ApprovalPolicy.Server.fs:272-284 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/ApprovalPolicy.Server.fs:272` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) src/Grace.Server/PromotionSet.Server.fs:30 — src/Grace.Server/PromotionSet.Server.fs:30-41 | src/Grace.Server/ValidationSet.Server.fs:42-53 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (12 lines × 2) src/Grace.Server/WorkItem.Server.fs:1176 — src/Grace.Server/WorkItem.Server.fs:1176-1187 | src/Grace.Server/WorkItem.Server.fs:1356-1367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) src/Grace.CLI/LocalStateDb.CLI.fs:550 — src/Grace.CLI/LocalStateDb.CLI.fs:550-561 | src/Grace.CLI/LocalStateDb.CLI.fs:592-604 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/LocalStateDb.CLI.fs:550` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) src/Grace.CLI/Command/Config.CLI.fs:16 — src/Grace.CLI/Command/Config.CLI.fs:16-27 | src/Grace.CLI/Command/Diff.CLI.fs:20-31 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) src/Grace.CLI/Command/Owner.CLI.fs:203 — src/Grace.CLI/Command/Owner.CLI.fs:203-214 | src/Grace.CLI/Command/Organization.CLI.fs:241-252 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Owner.CLI.fs:203` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) src/Grace.CLI/Command/Diff.CLI.fs:479 — src/Grace.CLI/Command/Diff.CLI.fs:479-490 | src/Grace.CLI/Command/Branch.CLI.fs:4096-4107 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Diff.CLI.fs:479` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:766 — src/Grace.CLI/Command/Branch.CLI.fs:766-777 | src/Grace.CLI/Command/Branch.CLI.fs:910-921 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:811 — src/Grace.CLI/Command/Branch.CLI.fs:811-822 | src/Grace.CLI/Command/Branch.CLI.fs:1126-1137 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:1748 — src/Grace.CLI/Command/Branch.CLI.fs:1748-1759 | src/Grace.CLI/Command/Branch.CLI.fs:1776-1787 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:1748` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) src/Grace.CLI/Command/Reference.CLI.fs:734 — src/Grace.CLI/Command/Reference.CLI.fs:734-745 | src/Grace.CLI/Command/Reference.CLI.fs:872-883 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Reference.CLI.fs:734` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×21
  • Duplicated block (10 lines × 2) src/Grace.Actors/Services.Actor.fs:2882 — src/Grace.Actors/Services.Actor.fs:2882-2891 | src/Grace.Actors/Services.Actor.fs:3009-3018 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Services.Actor.fs:2882` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) src/Grace.Actors/Services.Actor.fs:3389 — src/Grace.Actors/Services.Actor.fs:3389-3398 | src/Grace.Actors/Services.Actor.fs:3464-3473 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Services.Actor.fs:3389` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/Grace.Actors/Owner.Actor.fs:363 — src/Grace.Actors/Owner.Actor.fs:363-372 | src/Grace.Actors/Organization.Actor.fs:328-337 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Owner.Actor.fs:363` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) src/Grace.Actors/Policy.Actor.fs:54 — src/Grace.Actors/Policy.Actor.fs:54-63 | src/Grace.Actors/Policy.Actor.fs:87-96 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) src/Grace.Actors/UploadSession.Actor.fs:420 — src/Grace.Actors/UploadSession.Actor.fs:420-429 | src/Grace.Server/Storage.Server.fs:597-606 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) src/Grace.Shared/ManifestValidation.Shared.fs:106 — src/Grace.Shared/ManifestValidation.Shared.fs:106-115 | src/Grace.Server/Storage.Server.fs:1213-1222 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) src/Grace.Shared/Validation/Errors.Validation.fs:126 — src/Grace.Shared/Validation/Errors.Validation.fs:126-135 | src/Grace.Shared/Validation/Errors.Validation.fs:516-525 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) src/Grace.Server/Services.Server.fs:52 — src/Grace.Server/Services.Server.fs:52-61 | src/Grace.Server/Middleware/SdkLifecycle.Middleware.fs:112-121 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) src/Grace.Server/Organization.Server.fs:4 — src/Grace.Server/Organization.Server.fs:4-13 | src/Grace.Server/Repository.Server.fs:6-15 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (10 lines × 2) src/Grace.Server/Repository.Server.fs:18 — src/Grace.Server/Repository.Server.fs:18-27 | src/Grace.Server/Reminder.Server.fs:17-26 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (10 lines × 2) src/Grace.Server/Repository.Server.fs:224 — src/Grace.Server/Repository.Server.fs:224-233 | src/Grace.Server/Reminder.Server.fs:70-79 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Repository.Server.fs:224` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) src/Grace.Server/AnnotationMaterialization.Server.fs:274 — src/Grace.Server/AnnotationMaterialization.Server.fs:274-283 | src/Grace.Server/NormalFileMaterialization.Server.fs:358-367 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/NormalFileMaterialization.Server.fs:358` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) src/Grace.Server/Branch.Server.fs:647 — src/Grace.Server/Branch.Server.fs:647-656 | src/Grace.Server/Branch.Server.fs:813-822 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Branch.Server.fs:647` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) src/Grace.Server/WorkItem.Server.fs:496 — src/Grace.Server/WorkItem.Server.fs:496-505 | src/Grace.Server/Artifact.Server.fs:39-48 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (10 lines × 2) src/Grace.Server/Review.Server.fs:777 — src/Grace.Server/Review.Server.fs:777-786 | src/Grace.Server/Review.Server.fs:792-801 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Review.Server.fs:777` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) src/Grace.Server/Review.Server.fs:881 — src/Grace.Server/Review.Server.fs:881-890 | src/Grace.Server/Review.Server.fs:947-956 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Review.Server.fs:881` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/Grace.Server/ValidationSet.Server.fs:78 — src/Grace.Server/ValidationSet.Server.fs:78-87 | src/Grace.Server/ValidationSet.Server.fs:89-98 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) src/Grace.Server/Storage.Server.fs:639 — src/Grace.Server/Storage.Server.fs:639-648 | src/Grace.Server/Storage.Server.fs:658-667 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) src/Grace.Server/Startup.Server.fs:360 — src/Grace.Server/Startup.Server.fs:360-369 | src/Grace.Server/Startup.Server.fs:384-393 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) src/Grace.CLI/Command/Services.CLI.fs:2865 — src/Grace.CLI/Command/Services.CLI.fs:2865-2874 | src/Grace.CLI/Command/Services.CLI.fs:2937-2946 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Services.CLI.fs:2865` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) src/Grace.CLI/Command/Reference.CLI.fs:352 — src/Grace.CLI/Command/Reference.CLI.fs:352-361 | src/Grace.CLI/Command/Reference.CLI.fs:1377-1386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Reference.CLI.fs:352` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×19
  • Duplicated block (14 lines × 2) src/Grace.Actors/Interfaces.Actor.fs:540 — src/Grace.Actors/Interfaces.Actor.fs:540-553 | src/Grace.Actors/Interfaces.Actor.fs:582-595 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (14 lines × 2) src/Grace.Actors/Services.Actor.fs:2811 — src/Grace.Actors/Services.Actor.fs:2811-2824 | src/Grace.Actors/Services.Actor.fs:2891-2904 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Services.Actor.fs:2811` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) src/Grace.Actors/UploadSession.Actor.fs:667 — src/Grace.Actors/UploadSession.Actor.fs:667-680 | src/Grace.Server/Storage.Server.fs:697-710 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (14 lines × 2) src/Grace.Actors/UploadSession.Actor.fs:683 — src/Grace.Actors/UploadSession.Actor.fs:683-696 | src/Grace.Server/Storage.Server.fs:713-726 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/UploadSession.Actor.fs:683` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) src/Grace.Types/Artifact.Types.fs:178 — src/Grace.Types/Artifact.Types.fs:178-191 | src/Grace.Types/Artifact.Types.fs:249-262 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) src/Grace.Server/Security/AuthorizationMiddleware.Server.fs:239 — src/Grace.Server/Security/AuthorizationMiddleware.Server.fs:239-252 | src/Grace.Server/Security/AuthorizationMiddleware.Server.fs:270-283 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Security/AuthorizationMiddleware.Server.fs:239` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) src/Grace.Server/Branch.Server.fs:2468 — src/Grace.Server/Branch.Server.fs:2468-2481 | src/Grace.Server/Branch.Server.fs:2578-2591 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Branch.Server.fs:2468` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) src/Grace.Server/ApprovalPolicy.Server.fs:428 — src/Grace.Server/ApprovalPolicy.Server.fs:428-441 | src/Grace.Server/Webhook.Server.fs:236-249 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (14 lines × 2) src/Grace.Server/Review.Server.fs:1335 — src/Grace.Server/Review.Server.fs:1335-1348 | src/Grace.Server/Review.Server.fs:1373-1386 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Review.Server.fs:1335` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) src/Grace.Server/ManifestContributionRepair.Server.fs:499 — src/Grace.Server/ManifestContributionRepair.Server.fs:499-512 | src/Grace.Server/ManifestContributionRepair.Server.fs:605-618 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) src/Grace.Server/Notification.Server.fs:405 — src/Grace.Server/Notification.Server.fs:405-418 | src/Grace.Server/Notification.Server.fs:768-781 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) src/Grace.CLI/LocalStateDb.CLI.fs:803 — src/Grace.CLI/LocalStateDb.CLI.fs:803-816 | src/Grace.CLI/LocalStateDb.CLI.fs:895-908 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) src/Grace.CLI/Command/Services.CLI.fs:105 — src/Grace.CLI/Command/Services.CLI.fs:105-118 | src/Grace.CLI/Command/Watch.CLI.fs:781-794 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (14 lines × 2) src/Grace.CLI/Command/Auth.CLI.fs:1363 — src/Grace.CLI/Command/Auth.CLI.fs:1363-1376 | src/Grace.CLI/Command/Auth.CLI.fs:1743-1756 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Auth.CLI.fs:1363` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) src/Grace.CLI/Command/Config.CLI.fs:129 — src/Grace.CLI/Command/Config.CLI.fs:129-142 | src/Grace.CLI/Command/Config.CLI.fs:181-194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (14 lines × 2) src/Grace.CLI/Command/Repository.CLI.fs:810 — src/Grace.CLI/Command/Repository.CLI.fs:810-823 | src/Grace.CLI/Command/Repository.CLI.fs:1788-1801 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Repository.CLI.fs:810` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:211 — src/Grace.CLI/Command/Branch.CLI.fs:211-224 | src/Grace.CLI/Command/Reference.CLI.fs:167-180 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (14 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:1673 — src/Grace.CLI/Command/Branch.CLI.fs:1673-1686 | src/Grace.CLI/Command/Reference.CLI.fs:1123-1136 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:1673` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:5038 — src/Grace.CLI/Command/Branch.CLI.fs:5038-5051 | src/Grace.CLI/Command/Reference.CLI.fs:1447-1460 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×18
  • Duplicated block (15 lines × 2) src/Grace.Actors/Owner.Actor.fs:169 — src/Grace.Actors/Owner.Actor.fs:169-183 | src/Grace.Actors/Organization.Actor.fs:142-156 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Owner.Actor.fs:169` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) src/Grace.Actors/Review.Actor.fs:64 — src/Grace.Actors/Review.Actor.fs:64-78 | src/Grace.Actors/Review.Actor.fs:108-122 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Review.Actor.fs:64` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) src/Grace.Types/ContentBlockMetadata.Types.fs:371 — src/Grace.Types/ContentBlockMetadata.Types.fs:371-385 | src/Grace.Types/ContentBlockMetadata.Types.fs:392-406 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Types/ContentBlockMetadata.Types.fs:371` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15 lines × 2) src/Grace.Shared/AzureEnvironment.Shared.fs:130 — src/Grace.Shared/AzureEnvironment.Shared.fs:130-144 | src/Grace.Server/ApplicationContext.Server.fs:224-238 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15 lines × 2) src/Grace.Server/Validations.Server.fs:159 — src/Grace.Server/Validations.Server.fs:159-173 | src/Grace.Server/Validations.Server.fs:226-240 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) src/Grace.Server/ApprovalPolicy.Server.fs:379 — src/Grace.Server/ApprovalPolicy.Server.fs:379-393 | src/Grace.Server/ApprovalPolicy.Server.fs:399-413 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) src/Grace.Server/PromotionSet.Server.fs:359 — src/Grace.Server/PromotionSet.Server.fs:359-373 | src/Grace.Server/PromotionSet.Server.fs:390-404 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/PromotionSet.Server.fs:359` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) src/Grace.Server/Webhook.Server.fs:192 — src/Grace.Server/Webhook.Server.fs:192-206 | src/Grace.Server/Webhook.Server.fs:210-224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) src/Grace.Server/ManifestContributionAccounting.Server.fs:364 — src/Grace.Server/ManifestContributionAccounting.Server.fs:364-378 | src/Grace.Server/ManifestContributionAccounting.Server.fs:385-399 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) src/Grace.CLI/LocalStateDb.CLI.fs:2831 — src/Grace.CLI/LocalStateDb.CLI.fs:2831-2845 | src/Grace.CLI/LocalStateDb.CLI.fs:3201-3215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) src/Grace.CLI/LocalStateDb.CLI.fs:2865 — src/Grace.CLI/LocalStateDb.CLI.fs:2865-2879 | src/Grace.CLI/LocalStateDb.CLI.fs:3252-3266 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) src/Grace.CLI/LocalStateDb.CLI.fs:2925 — src/Grace.CLI/LocalStateDb.CLI.fs:2925-2939 | src/Grace.CLI/LocalStateDb.CLI.fs:3098-3112 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/LocalStateDb.CLI.fs:2925` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15 lines × 2) src/Grace.CLI/Command/Services.CLI.fs:2615 — src/Grace.CLI/Command/Services.CLI.fs:2615-2629 | src/Grace.CLI/Command/Watch.CLI.fs:6228-6242 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Services.CLI.fs:2615` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (15 lines × 2) src/Grace.CLI/Command/Owner.CLI.fs:542 — src/Grace.CLI/Command/Owner.CLI.fs:542-556 | src/Grace.CLI/Command/Organization.CLI.fs:573-587 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Owner.CLI.fs:542` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:737 — src/Grace.CLI/Command/Branch.CLI.fs:737-751 | src/Grace.CLI/Command/Branch.CLI.fs:880-894 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:2465 — src/Grace.CLI/Command/Branch.CLI.fs:2465-2479 | src/Grace.CLI/Command/Branch.CLI.fs:2501-2515 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:2465` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) src/Grace.CLI/Command/Reference.CLI.fs:772 — src/Grace.CLI/Command/Reference.CLI.fs:772-788 | src/Grace.CLI/Command/Reference.CLI.fs:903-917 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (15 lines × 2) src/Grace.CLI/Command/Reference.CLI.fs:1285 — src/Grace.CLI/Command/Reference.CLI.fs:1285-1299 | src/Grace.CLI/Command/Reference.CLI.fs:1320-1334 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Reference.CLI.fs:1285` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×18
  • Duplicated block (11 lines × 2) src/Grace.Actors/Services.Actor.fs:808 — src/Grace.Actors/Services.Actor.fs:808-818 | src/Grace.Actors/Services.Actor.fs:820-830 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Services.Actor.fs:808` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/Grace.Actors/Services.Actor.fs:1167 — src/Grace.Actors/Services.Actor.fs:1167-1177 | src/Grace.Actors/Services.Actor.fs:1290-1302 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) src/Grace.Actors/UploadSession.Actor.fs:430 — src/Grace.Actors/UploadSession.Actor.fs:430-440 | src/Grace.Server/Storage.Server.fs:607-617 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) src/Grace.Types/Common.Types.fs:740 — src/Grace.Types/Common.Types.fs:740-750 | src/Grace.Types/Common.Types.fs:877-887 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) src/Grace.Server/Security/OutboundUrlSafety.Server.fs:87 — src/Grace.Server/Security/OutboundUrlSafety.Server.fs:87-97 | src/Grace.Server/Security/OutboundUrlSafety.Server.fs:107-117 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) src/Grace.Server/Repository.Server.fs:182 — src/Grace.Server/Repository.Server.fs:182-192 | src/Grace.Server/Reminder.Server.fs:100-110 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Repository.Server.fs:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) src/Grace.Server/Repository.Server.fs:654 — src/Grace.Server/Repository.Server.fs:654-664 | src/Grace.Server/Repository.Server.fs:705-715 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Repository.Server.fs:654` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/Grace.Server/ApprovalRequest.Server.fs:51 — src/Grace.Server/ApprovalRequest.Server.fs:51-61 | src/Grace.Server/ApprovalRequest.Server.fs:67-77 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/ApprovalRequest.Server.fs:51` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) src/Grace.Server/PromotionSet.Server.fs:245 — src/Grace.Server/PromotionSet.Server.fs:245-255 | src/Grace.Server/Review.Server.fs:857-867 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) src/Grace.Server/WorkItem.Server.fs:168 — src/Grace.Server/WorkItem.Server.fs:168-178 | src/Grace.Server/WorkItem.Server.fs:262-272 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) src/Grace.Server/ValidationSet.Server.fs:1 — src/Grace.Server/ValidationSet.Server.fs:1-11 | src/Grace.Server/ValidationResult.Server.fs:1-11 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (11 lines × 2) src/Grace.Server/DirectoryVersion.Server.fs:126 — src/Grace.Server/DirectoryVersion.Server.fs:126-136 | src/Grace.Server/DirectoryVersion.Server.fs:345-355 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/DirectoryVersion.Server.fs:126` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) src/Grace.Server/Access.Server.fs:596 — src/Grace.Server/Access.Server.fs:596-606 | src/Grace.Server/Access.Server.fs:626-636 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) src/Grace.CLI/LocalStateDb.CLI.fs:1048 — src/Grace.CLI/LocalStateDb.CLI.fs:1048-1058 | src/Grace.CLI/LocalStateDb.CLI.fs:1214-1224 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) src/Grace.CLI/Command/Services.CLI.fs:3828 — src/Grace.CLI/Command/Services.CLI.fs:3828-3838 | src/Grace.CLI/Command/Watch.CLI.fs:6907-6917 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Services.CLI.fs:3828` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:569 — src/Grace.CLI/Command/Branch.CLI.fs:569-579 | src/Grace.CLI/Command/Reference.CLI.fs:450-460 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Reference.CLI.fs:450` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:1086 — src/Grace.CLI/Command/Branch.CLI.fs:1086-1096 | src/Grace.CLI/Command/Reference.CLI.fs:484-494 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (11 lines × 2) src/Grace.CLI/Command/Watch.CLI.fs:2079 — src/Grace.CLI/Command/Watch.CLI.fs:2079-2089 | src/Grace.CLI/Command/Watch.CLI.fs:3311-3321 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×16
  • Duplicated block (9 lines × 2) src/Grace.Actors/DirectoryVersion.Actor.fs:209 — src/Grace.Actors/DirectoryVersion.Actor.fs:209-217 | src/Grace.Actors/DirectoryVersion.Actor.fs:1589-1597 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/Grace.Actors/ManifestContributionWorkflow.Actor.fs:340 — src/Grace.Actors/ManifestContributionWorkflow.Actor.fs:340-348 | src/Grace.Actors/ManifestContributionWorkflow.Actor.fs:363-371 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/Grace.Types/Common.Types.fs:635 — src/Grace.Types/Common.Types.fs:635-643 | src/Grace.Types/Common.Types.fs:774-782 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/Grace.Shared/Validation/Errors.Validation.fs:114 — src/Grace.Shared/Validation/Errors.Validation.fs:114-122 | src/Grace.Shared/Validation/Errors.Validation.fs:504-512 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/Grace.Server/Repository.Server.fs:157 — src/Grace.Server/Repository.Server.fs:157-165 | src/Grace.Server/Branch.Server.fs:622-630 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) src/Grace.Server/PromotionSet.Server.fs:223 — src/Grace.Server/PromotionSet.Server.fs:223-231 | src/Grace.Server/ValidationSet.Server.fs:62-71 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/PromotionSet.Server.fs:223` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/Grace.Server/WorkItem.Server.fs:1505 — src/Grace.Server/WorkItem.Server.fs:1505-1513 | src/Grace.Server/WorkItem.Server.fs:1517-1525 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/WorkItem.Server.fs:1505` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) src/Grace.Server/Storage.Server.fs:1589 — src/Grace.Server/Storage.Server.fs:1589-1597 | src/Grace.Server/Storage.Server.fs:1633-1641 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) src/Grace.Server/Access.Server.fs:173 — src/Grace.Server/Access.Server.fs:173-181 | src/Grace.Server/Access.Server.fs:278-286 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) src/Grace.CLI/LocalStateDb.CLI.fs:2898 — src/Grace.CLI/LocalStateDb.CLI.fs:2898-2906 | src/Grace.CLI/LocalStateDb.CLI.fs:3233-3241 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/LocalStateDb.CLI.fs:2898` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/Grace.CLI/Command/Services.CLI.fs:2251 — src/Grace.CLI/Command/Services.CLI.fs:2251-2259 | src/Grace.CLI/Command/Services.CLI.fs:2290-2298 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Services.CLI.fs:2251` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) src/Grace.CLI/Command/Connect.CLI.fs:41 — src/Grace.CLI/Command/Connect.CLI.fs:41-49 | src/Grace.CLI/Command/Branch.CLI.fs:66-74 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (9 lines × 2) src/Grace.CLI/Command/Repository.CLI.fs:327 — src/Grace.CLI/Command/Repository.CLI.fs:327-335 | src/Grace.CLI/Command/Repository.CLI.fs:346-354 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (9 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:492 — src/Grace.CLI/Command/Branch.CLI.fs:492-500 | src/Grace.CLI/Command/Branch.CLI.fs:507-515 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:837 — src/Grace.CLI/Command/Branch.CLI.fs:837-845 | src/Grace.CLI/Command/Reference.CLI.fs:223-231 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (9 lines × 2) src/Grace.CLI/Command/Reference.CLI.fs:1184 — src/Grace.CLI/Command/Reference.CLI.fs:1184-1192 | src/Grace.CLI/Command/Reference.CLI.fs:1205-1213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Reference.CLI.fs:1184` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×16
  • Duplicated block (8 lines × 2) src/Grace.Actors/Services.Actor.fs:1424 — src/Grace.Actors/Services.Actor.fs:1424-1431 | src/Grace.Actors/Services.Actor.fs:1498-1505 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Services.Actor.fs:1424` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/Grace.Actors/Owner.Actor.fs:317 — src/Grace.Actors/Owner.Actor.fs:317-324 | src/Grace.Actors/Organization.Actor.fs:283-290 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Owner.Actor.fs:317` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) src/Grace.Actors/Reference.Actor.fs:795 — src/Grace.Actors/Reference.Actor.fs:795-802 | src/Grace.Actors/Reference.Actor.fs:896-903 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Reference.Actor.fs:795` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/Grace.Actors/UploadSession.Actor.fs:1931 — src/Grace.Actors/UploadSession.Actor.fs:1931-1938 | src/Grace.Actors/UploadSession.Actor.fs:1966-1973 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) src/Grace.Actors/UploadSession.Actor.fs:1967 — src/Grace.Actors/UploadSession.Actor.fs:1967-1974 | src/Grace.Actors/UploadSession.Actor.fs:2006-2013 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) src/Grace.Shared/DedupeIndex.Shared.fs:467 — src/Grace.Shared/DedupeIndex.Shared.fs:467-474 | src/Grace.Server/NormalFileMaterialization.Server.fs:169-176 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 2) src/Grace.Shared/Validation/Errors.Validation.fs:89 — src/Grace.Shared/Validation/Errors.Validation.fs:89-96 | src/Grace.Shared/Validation/Errors.Validation.fs:481-488 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/Grace.Shared/Validation/Errors.Validation.fs:100 — src/Grace.Shared/Validation/Errors.Validation.fs:100-107 | src/Grace.Shared/Validation/Errors.Validation.fs:491-498 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/Grace.Server/Security/AuthorizationMiddleware.Server.fs:258 — src/Grace.Server/Security/AuthorizationMiddleware.Server.fs:258-265 | src/Grace.Server/Security/AuthorizationMiddleware.Server.fs:290-297 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) src/Grace.Server/WorkItem.Server.fs:900 — src/Grace.Server/WorkItem.Server.fs:900-907 | src/Grace.Server/WorkItem.Server.fs:912-919 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/Grace.Server/Queue.Server.fs:45 — src/Grace.Server/Queue.Server.fs:45-52 | src/Grace.Server/Queue.Server.fs:139-148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Queue.Server.fs:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) src/Grace.Server/ManifestContributionRepair.Server.fs:556 — src/Grace.Server/ManifestContributionRepair.Server.fs:556-563 | src/Grace.Server/ManifestContributionRepair.Server.fs:635-642 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/Grace.Server/Storage.Server.fs:1077 — src/Grace.Server/Storage.Server.fs:1077-1084 | src/Grace.Server/Storage.Server.fs:1373-1380 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/Grace.Server/Access.Server.fs:163 — src/Grace.Server/Access.Server.fs:163-170 | src/Grace.Server/Access.Server.fs:268-275 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/Grace.CLI/Command/Config.CLI.fs:73 — src/Grace.CLI/Command/Config.CLI.fs:73-80 | src/Grace.CLI/Command/Diff.CLI.fs:211-218 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (8 lines × 2) src/Grace.CLI/Command/Owner.CLI.fs:138 — src/Grace.CLI/Command/Owner.CLI.fs:138-145 | src/Grace.CLI/Command/Owner.CLI.fs:153-160 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×14
  • Duplicated block (17 lines × 2) src/Grace.Server/Middleware/SdkLifecycle.Middleware.fs:133 — src/Grace.Server/Middleware/SdkLifecycle.Middleware.fs:133-149 | src/Grace.Server/Middleware/SdkLifecycle.Middleware.fs:155-171 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Middleware/SdkLifecycle.Middleware.fs:133` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) src/Grace.Server/Owner.Server.fs:114 — src/Grace.Server/Owner.Server.fs:114-131 | src/Grace.Server/Organization.Server.fs:92-108 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Owner.Server.fs:114` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) src/Grace.Server/Diff.Server.fs:142 — src/Grace.Server/Diff.Server.fs:142-158 | src/Grace.Server/Diff.Server.fs:183-199 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) src/Grace.Server/Storage.Server.fs:1132 — src/Grace.Server/Storage.Server.fs:1132-1148 | src/Grace.Server/Storage.Server.fs:1182-1198 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Storage.Server.fs:1132` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) src/Grace.Server/Notification.Server.fs:1186 — src/Grace.Server/Notification.Server.fs:1186-1202 | src/Grace.Server/Notification.Server.fs:1247-1263 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) src/Grace.CLI/Command/Owner.CLI.fs:161 — src/Grace.CLI/Command/Owner.CLI.fs:161-177 | src/Grace.CLI/Command/Organization.CLI.fs:197-213 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Owner.CLI.fs:161` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) src/Grace.CLI/Command/Owner.CLI.fs:224 — src/Grace.CLI/Command/Owner.CLI.fs:224-240 | src/Grace.CLI/Command/Organization.CLI.fs:262-278 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Owner.CLI.fs:224` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) src/Grace.CLI/Command/Owner.CLI.fs:342 — src/Grace.CLI/Command/Owner.CLI.fs:342-358 | src/Grace.CLI/Command/Organization.CLI.fs:365-381 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Owner.CLI.fs:342` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) src/Grace.CLI/Command/Owner.CLI.fs:392 — src/Grace.CLI/Command/Owner.CLI.fs:392-408 | src/Grace.CLI/Command/Organization.CLI.fs:417-433 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Owner.CLI.fs:392` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) src/Grace.CLI/Command/Owner.CLI.fs:442 — src/Grace.CLI/Command/Owner.CLI.fs:442-458 | src/Grace.CLI/Command/Organization.CLI.fs:469-485 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Owner.CLI.fs:442` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) src/Grace.CLI/Command/Owner.CLI.fs:493 — src/Grace.CLI/Command/Owner.CLI.fs:493-509 | src/Grace.CLI/Command/Organization.CLI.fs:522-538 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Owner.CLI.fs:493` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (17 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:1440 — src/Grace.CLI/Command/Branch.CLI.fs:1440-1456 | src/Grace.CLI/Command/Branch.CLI.fs:3433-3449 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (17 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:5329 — src/Grace.CLI/Command/Branch.CLI.fs:5329-5345 | src/Grace.CLI/Command/Reference.CLI.fs:1507-1523 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (17 lines × 2) src/Grace.CLI/Command/Reference.CLI.fs:281 — src/Grace.CLI/Command/Reference.CLI.fs:281-297 | src/Grace.CLI/Command/Reference.CLI.fs:359-375 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Reference.CLI.fs:281` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D15 · Churn × Complexity Hotspots · Hotspot · ×10
  • Hotspot: src/Grace.CLI/Command/Watch.CLI.fs src/Grace.CLI/Command/Watch.CLI.fs — src/Grace.CLI/Command/Watch.CLI.fs changed 182 times in last 90 days, max complexity 84. 96 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: src/Grace.CLI/Command/Doctor.CLI.fs src/Grace.CLI/Command/Doctor.CLI.fs — src/Grace.CLI/Command/Doctor.CLI.fs changed 27 times in last 90 days, max complexity 146. 13 of those changes were fix/bug commits, and the other 14 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: src/Grace.CLI/Program.CLI.fs src/Grace.CLI/Program.CLI.fs — src/Grace.CLI/Program.CLI.fs changed 24 times in last 90 days, max complexity 92. 3 of those changes were fix/bug commits, and the other 21 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: src/Grace.CLI/Command/Services.CLI.fs src/Grace.CLI/Command/Services.CLI.fs — src/Grace.CLI/Command/Services.CLI.fs changed 75 times in last 90 days, max complexity 28. 35 of those changes were fix/bug commits, and the other 40 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: src/Grace.Server/Storage.Server.fs src/Grace.Server/Storage.Server.fs — src/Grace.Server/Storage.Server.fs changed 53 times in last 90 days, max complexity 29. 22 of those changes were fix/bug commits, and the other 31 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: src/Grace.Actors/Branch.Actor.fs src/Grace.Actors/Branch.Actor.fs — src/Grace.Actors/Branch.Actor.fs changed 15 times in last 90 days, max complexity 102. 5 of those changes were fix/bug commits, and the other 10 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: src/Grace.Server/ManifestContributionDiagnosis.Server.fs src/Grace.Server/ManifestContributionDiagnosis.Server.fs — src/Grace.Server/ManifestContributionDiagnosis.Server.fs changed 10 times in last 90 days, max complexity 144. 5 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: src/Grace.CLI/Command/Branch.CLI.fs src/Grace.CLI/Command/Branch.CLI.fs — src/Grace.CLI/Command/Branch.CLI.fs changed 42 times in last 90 days, max complexity 34. 19 of those changes were fix/bug commits, and the other 23 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: src/Grace.Actors/UploadSession.Actor.fs src/Grace.Actors/UploadSession.Actor.fs — src/Grace.Actors/UploadSession.Actor.fs changed 31 times in last 90 days, max complexity 44. 14 of those changes were fix/bug commits, and the other 17 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: src/Grace.Actors/Reference.Actor.fs src/Grace.Actors/Reference.Actor.fs — src/Grace.Actors/Reference.Actor.fs changed 32 times in last 90 days, max complexity 33. 16 of those changes were fix/bug commits, and the other 16 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
D35 · Change Coupling · Change coupling · ×10
  • Change coupling: EndpointAuthorizationManifest.Server.fs ↔ Startup.Server.fs src/Grace.Server/Security/EndpointAuthorizationManifest.Server.fs — `src/Grace.Server/Security/EndpointAuthorizationManifest.Server.fs` and `src/Grace.Server/Startup.Server.fs` change together 100% of the time (18 of the 18 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). They sit in different directories, but in this ecosystem the namespace is declared in the FILE, not by the folder — so the two may well share one namespace and reference each other with no import for this pass to see. Read the pair before acting: if one derives from or overrides the other, the dependency is explicit in the type declaration and the co-change is definitional; if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE and the thing to add is a comment saying so; if they simply belong together, co-locate them; if none of these holds, the coupling is hidden and worth breaking.
  • Change coupling: Constants.Actor.fs ↔ Interfaces.Actor.fs src/Grace.Actors/Constants.Actor.fs — `src/Grace.Actors/Constants.Actor.fs` and `src/Grace.Actors/Interfaces.Actor.fs` change together 80% of the time (8 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking.
  • Change coupling: OwnerName.Actor.fs ↔ RepositoryName.Actor.fs src/Grace.Actors/OwnerName.Actor.fs — `src/Grace.Actors/OwnerName.Actor.fs` and `src/Grace.Actors/RepositoryName.Actor.fs` change together 77% of the time (10 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking.
  • Change coupling: OrganizationName.Actor.fs ↔ RepositoryName.Actor.fs src/Grace.Actors/OrganizationName.Actor.fs — `src/Grace.Actors/OrganizationName.Actor.fs` and `src/Grace.Actors/RepositoryName.Actor.fs` change together 77% of the time (10 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking.
  • Change coupling: OrganizationName.Actor.fs ↔ OwnerName.Actor.fs src/Grace.Actors/OrganizationName.Actor.fs — `src/Grace.Actors/OrganizationName.Actor.fs` and `src/Grace.Actors/OwnerName.Actor.fs` change together 71% of the time (10 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking.
  • Change coupling: Owner.Actor.fs ↔ Repository.Actor.fs src/Grace.Actors/Owner.Actor.fs — `src/Grace.Actors/Owner.Actor.fs` and `src/Grace.Actors/Repository.Actor.fs` change together 70% of the time (19 of the 27 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking.
  • Change coupling: BranchName.Actor.fs ↔ RepositoryName.Actor.fs src/Grace.Actors/BranchName.Actor.fs — `src/Grace.Actors/BranchName.Actor.fs` and `src/Grace.Actors/RepositoryName.Actor.fs` change together 69% of the time (9 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking.
  • Change coupling: BranchName.Actor.fs ↔ OwnerName.Actor.fs src/Grace.Actors/BranchName.Actor.fs — `src/Grace.Actors/BranchName.Actor.fs` and `src/Grace.Actors/OwnerName.Actor.fs` change together 64% of the time (9 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking.
  • Change coupling: OrganizationName.Actor.fs ↔ Repository.Actor.fs src/Grace.Actors/OrganizationName.Actor.fs — `src/Grace.Actors/OrganizationName.Actor.fs` and `src/Grace.Actors/Repository.Actor.fs` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking.
  • Change coupling: BranchName.Actor.fs ↔ Organization.Actor.fs src/Grace.Actors/BranchName.Actor.fs — `src/Grace.Actors/BranchName.Actor.fs` and `src/Grace.Actors/Organization.Actor.fs` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well). They sit in the same directory, and in this ecosystem sibling files there normally share one namespace/package — so a direct reference between them needs no import and this pass cannot see whether one exists. Read the pair before acting: if one file only DECLARES what the other consumes (a constants/types file beside its user), the co-change is definitional and the question is whether the split earns its keep; if they duplicate structure, extract the common part into a shared function or type they both call; if neither holds, the coupling is hidden and worth breaking.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×10
  • Duplicated block (16 lines × 2) src/Grace.Actors/Services.Actor.fs:623 — src/Grace.Actors/Services.Actor.fs:623-639 | src/Grace.Actors/Services.Actor.fs:708-723 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Services.Actor.fs:623` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) src/Grace.Actors/Services.Actor.fs:2673 — src/Grace.Actors/Services.Actor.fs:2673-2688 | src/Grace.Actors/Services.Actor.fs:2980-2995 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Services.Actor.fs:2673` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) src/Grace.Actors/Owner.Actor.fs:186 — src/Grace.Actors/Owner.Actor.fs:186-201 | src/Grace.Actors/Organization.Actor.fs:159-174 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Owner.Actor.fs:186` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) src/Grace.Server/Review.Server.fs:1155 — src/Grace.Server/Review.Server.fs:1155-1170 | src/Grace.Server/Review.Server.fs:1295-1310 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Review.Server.fs:1155` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) src/Grace.CLI/LocalStateDb.CLI.fs:3461 — src/Grace.CLI/LocalStateDb.CLI.fs:3461-3476 | src/Grace.CLI/LocalStateDb.CLI.fs:3674-3689 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/LocalStateDb.CLI.fs:3461` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) src/Grace.CLI/Command/Organization.CLI.fs:514 — src/Grace.CLI/Command/Organization.CLI.fs:514-529 | src/Grace.CLI/Command/Organization.CLI.fs:565-580 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Organization.CLI.fs:514` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (16 lines × 2) src/Grace.CLI/Command/Diff.CLI.fs:292 — src/Grace.CLI/Command/Diff.CLI.fs:292-307 | src/Grace.CLI/Command/Diff.CLI.fs:630-645 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Diff.CLI.fs:292` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) src/Grace.CLI/Command/Diff.CLI.fs:330 — src/Grace.CLI/Command/Diff.CLI.fs:330-345 | src/Grace.CLI/Command/Diff.CLI.fs:662-677 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:852 — src/Grace.CLI/Command/Branch.CLI.fs:852-867 | src/Grace.CLI/Command/Reference.CLI.fs:238-253 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:852` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:1304 — src/Grace.CLI/Command/Branch.CLI.fs:1304-1319 | src/Grace.CLI/Command/Reference.CLI.fs:746-761 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:1304` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×9
  • Duplicated block (7 lines × 2) src/Grace.Actors/Services.Actor.fs:2112 — src/Grace.Actors/Services.Actor.fs:2112-2118 | src/Grace.Actors/Services.Actor.fs:2530-2536 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) src/Grace.Actors/Reference.Actor.fs:644 — src/Grace.Actors/Reference.Actor.fs:644-650 | src/Grace.Actors/Reference.Actor.fs:782-788 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) src/Grace.Actors/RepositoryContentCounter.Actor.fs:414 — src/Grace.Actors/RepositoryContentCounter.Actor.fs:414-420 | src/Grace.Actors/ManifestContributionWorkflow.Actor.fs:391-399 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) src/Grace.Server/Branch.Server.fs:785 — src/Grace.Server/Branch.Server.fs:785-791 | src/Grace.Server/Branch.Server.fs:1685-1691 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) src/Grace.Server/Access.Server.fs:269 — src/Grace.Server/Access.Server.fs:269-275 | src/Grace.Server/Access.Server.fs:293-299 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) src/Grace.CLI/Command/Services.CLI.fs:2270 — src/Grace.CLI/Command/Services.CLI.fs:2270-2276 | src/Grace.CLI/Command/Services.CLI.fs:2357-2363 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) src/Grace.CLI/Command/Organization.CLI.fs:176 — src/Grace.CLI/Command/Organization.CLI.fs:176-182 | src/Grace.CLI/Command/Organization.CLI.fs:189-195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:303 — src/Grace.CLI/Command/Branch.CLI.fs:303-309 | src/Grace.CLI/Command/Reference.CLI.fs:195-201 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (7 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:869 — src/Grace.CLI/Command/Branch.CLI.fs:869-875 | src/Grace.CLI/Command/Reference.CLI.fs:255-261 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:869` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×9
  • Duplicated block (6 lines × 2) src/Grace.Actors/Reference.Actor.fs:669 — src/Grace.Actors/Reference.Actor.fs:669-674 | src/Grace.Actors/Reference.Actor.fs:794-799 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/Grace.Shared/Resources/Text/Languages.Resources.fs:179 — src/Grace.Shared/Resources/Text/Languages.Resources.fs:179-184 | src/Grace.Shared/Resources/Text/Languages.Resources.fs:322-327 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/Grace.Shared/Resources/Text/Languages.Resources.fs:350 — src/Grace.Shared/Resources/Text/Languages.Resources.fs:350-355 | src/Grace.Shared/Resources/Text/Languages.Resources.fs:615-620 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/Grace.Shared/Parameters/Branch.Parameters.fs:20 — src/Grace.Shared/Parameters/Branch.Parameters.fs:20-25 | src/Grace.Shared/Parameters/Reference.Parameters.fs:18-23 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (6 lines × 2) src/Grace.Shared/Parameters/Branch.Parameters.fs:48 — src/Grace.Shared/Parameters/Branch.Parameters.fs:48-53 | src/Grace.Shared/Parameters/Branch.Parameters.fs:63-68 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/Grace.Shared/Parameters/PromotionSet.Parameters.fs:16 — src/Grace.Shared/Parameters/PromotionSet.Parameters.fs:16-21 | src/Grace.Shared/Parameters/Review.Parameters.fs:33-38 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (6 lines × 2) src/Grace.Shared/Parameters/Validation.Parameters.fs:24 — src/Grace.Shared/Parameters/Validation.Parameters.fs:24-29 | src/Grace.Shared/Parameters/Validation.Parameters.fs:37-42 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/Grace.Server/Security/TestAuth.Server.fs:47 — src/Grace.Server/Security/TestAuth.Server.fs:47-52 | src/Grace.Server/Security/TestAuth.Server.fs:56-61 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) src/Grace.CLI/Command/Diff.CLI.fs:184 — src/Grace.CLI/Command/Diff.CLI.fs:184-189 | src/Grace.CLI/Command/Diff.CLI.fs:197-202 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×6
  • Duplicated block (18 lines × 2) src/Grace.Actors/PromotionSet.Actor.fs:175 — src/Grace.Actors/PromotionSet.Actor.fs:175-192 | src/Grace.Server/ApprovalPolicy.Server.fs:146-163 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/PromotionSet.Actor.fs:175` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (18 lines × 2) src/Grace.Actors/UploadSession.Actor.fs:850 — src/Grace.Actors/UploadSession.Actor.fs:850-867 | src/Grace.Actors/UploadSession.Actor.fs:1035-1052 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (18 lines × 2) src/Grace.Server/Validations.Server.fs:304 — src/Grace.Server/Validations.Server.fs:304-321 | src/Grace.Server/Validations.Server.fs:421-438 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Validations.Server.fs:304` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (18 lines × 2) src/Grace.CLI/Command/Diff.CLI.fs:399 — src/Grace.CLI/Command/Diff.CLI.fs:399-416 | src/Grace.CLI/Command/Diff.CLI.fs:733-752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:181 — src/Grace.CLI/Command/Branch.CLI.fs:181-198 | src/Grace.CLI/Command/Reference.CLI.fs:145-162 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:181` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (18 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:1260 — src/Grace.CLI/Command/Branch.CLI.fs:1260-1277 | src/Grace.CLI/Command/Reference.CLI.fs:685-702 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:1260` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×6
  • Duplicated block (5 lines × 2) src/Grace.Actors/Branch.Actor.fs:130 — src/Grace.Actors/Branch.Actor.fs:130-134 | src/Grace.Actors/Branch.Actor.fs:453-457 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) src/Grace.Shared/Parameters/Access.Parameters.fs:20 — src/Grace.Shared/Parameters/Access.Parameters.fs:20-24 | src/Grace.Shared/Parameters/Access.Parameters.fs:30-34 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) src/Grace.Shared/Parameters/WorkItem.Parameters.fs:130 — src/Grace.Shared/Parameters/WorkItem.Parameters.fs:130-134 | src/Grace.Shared/Parameters/WorkItem.Parameters.fs:144-148 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) src/Grace.Server/Security/CreatorScopeAdminGrant.Server.fs:30 — src/Grace.Server/Security/CreatorScopeAdminGrant.Server.fs:30-34 | src/Grace.Server/Access.Server.fs:61-65 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) src/Grace.CLI/LocalStateDb.CLI.fs:2916 — src/Grace.CLI/LocalStateDb.CLI.fs:2916-2920 | src/Grace.CLI/LocalStateDb.CLI.fs:3303-3307 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) src/Grace.CLI/Command/Watch.CLI.fs:893 — src/Grace.CLI/Command/Watch.CLI.fs:893-897 | src/Grace.CLI/Command/Watch.CLI.fs:1100-1104 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (11 lines × 3) · ×5
  • Duplicated block (11 lines × 3) src/Grace.Actors/Services.Actor.fs:1738 — src/Grace.Actors/Services.Actor.fs:1738-1748 | src/Grace.Actors/Services.Actor.fs:2336-2347 | src/Grace.Actors/Services.Actor.fs:2404-2415 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 3) src/Grace.Server/Organization.Server.fs:71 — src/Grace.Server/Organization.Server.fs:71-81 | src/Grace.Server/Repository.Server.fs:82-92 | src/Grace.Server/Branch.Server.fs:552-562 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Organization.Server.fs:71` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 3) src/Grace.Server/Repository.Server.fs:247 — src/Grace.Server/Repository.Server.fs:247-257 | src/Grace.Server/Reminder.Server.fs:93-103 | src/Grace.Server/Reminder.Server.fs:167-177 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Repository.Server.fs:247` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 3) src/Grace.Server/Policy.Server.fs:71 — src/Grace.Server/Policy.Server.fs:71-81 | src/Grace.Server/Review.Server.fs:832-842 | src/Grace.Server/Queue.Server.fs:51-61 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (11 lines × 3) src/Grace.CLI/Command/Services.CLI.fs:3769 — src/Grace.CLI/Command/Services.CLI.fs:3769-3779 | src/Grace.CLI/Command/Reference.CLI.fs:712-722 | src/Grace.CLI/Command/Reference.CLI.fs:851-861 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Services.CLI.fs:3769` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 3) · ×4
  • Duplicated block (16 lines × 3) src/Grace.Actors/DirectoryVersion.Actor.fs:850 — src/Grace.Actors/DirectoryVersion.Actor.fs:850-865 | src/Grace.Actors/Reference.Actor.fs:539-554 | src/Grace.Actors/Diff.Actor.fs:177-192 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/DirectoryVersion.Actor.fs:850` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 3) src/Grace.Server/DirectoryVersion.Server.fs:184 — src/Grace.Server/DirectoryVersion.Server.fs:184-199 | src/Grace.Server/DirectoryVersion.Server.fs:219-234 | src/Grace.Server/DirectoryVersion.Server.fs:443-458 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/DirectoryVersion.Server.fs:184` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 3) src/Grace.CLI/Command/Diff.CLI.fs:91 — src/Grace.CLI/Command/Diff.CLI.fs:91-106 | src/Grace.CLI/Command/Branch.CLI.fs:131-146 | src/Grace.CLI/Command/Watch.CLI.fs:409-424 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Diff.CLI.fs:91` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 3) src/Grace.CLI/Command/Branch.CLI.fs:140 — src/Grace.CLI/Command/Branch.CLI.fs:140-155 | src/Grace.CLI/Command/Reference.CLI.fs:51-66 | src/Grace.CLI/Command/Watch.CLI.fs:418-433 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:140` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D2 · Cognitive Complexity · Create.InvokeAsync (cognitive 20) · ×3
  • Create.InvokeAsync (cognitive 20) src/Grace.CLI/Command/Repository.CLI.fs:292 — Create.InvokeAsync has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, match/switch 7, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Create.InvokeAsync (cognitive 20) src/Grace.CLI/Command/Organization.CLI.fs:147 — Create.InvokeAsync has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, match/switch 7, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Create.InvokeAsync (cognitive 20) src/Grace.CLI/Command/Owner.CLI.fs:104 — Create.InvokeAsync has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12, match/switch 7, error handling 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×3
  • Duplicated block (20 lines × 2) src/Grace.Actors/Services.Actor.fs:655 — src/Grace.Actors/Services.Actor.fs:655-674 | src/Grace.Actors/Services.Actor.fs:740-759 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Services.Actor.fs:655` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (20 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:1356 — src/Grace.CLI/Command/Branch.CLI.fs:1356-1375 | src/Grace.CLI/Command/Reference.CLI.fs:797-816 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:1356` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (20 lines × 2) src/Grace.CLI/Command/Watch.CLI.fs:6731 — src/Grace.CLI/Command/Watch.CLI.fs:6731-6750 | src/Grace.CLI/Command/Watch.CLI.fs:6836-6855 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×3
  • Duplicated block (14 lines × 3) src/Grace.Actors/Services.Actor.fs:2172 — src/Grace.Actors/Services.Actor.fs:2172-2185 | src/Grace.Actors/Services.Actor.fs:2337-2350 | src/Grace.Actors/Services.Actor.fs:2405-2418 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (14 lines × 3) src/Grace.Actors/WorkItem.Actor.fs:181 — src/Grace.Actors/WorkItem.Actor.fs:181-194 | src/Grace.Actors/Policy.Actor.fs:200-213 | src/Grace.Actors/Review.Actor.fs:223-236 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/WorkItem.Actor.fs:181` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 3) src/Grace.Server/Policy.Server.fs:108 — src/Grace.Server/Policy.Server.fs:108-121 | src/Grace.Server/Queue.Server.fs:88-101 | src/Grace.Server/Queue.Server.fs:183-196 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Policy.Server.fs:108` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×3
  • Duplicated block (12 lines × 3) src/Grace.Server/WorkItem.Server.fs:1154 — src/Grace.Server/WorkItem.Server.fs:1154-1165 | src/Grace.Server/WorkItem.Server.fs:1236-1247 | src/Grace.Server/WorkItem.Server.fs:1335-1346 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (12 lines × 3) src/Grace.Server/Policy.Server.fs:1 — src/Grace.Server/Policy.Server.fs:1-12 | src/Grace.Server/Review.Server.fs:1-12 | src/Grace.Server/Queue.Server.fs:1-12 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
  • Duplicated block (12 lines × 3) src/Grace.CLI/Command/Branch.CLI.fs:1720 — src/Grace.CLI/Command/Branch.CLI.fs:1720-1731 | src/Grace.CLI/Command/Branch.CLI.fs:1804-1815 | src/Grace.CLI/Command/Branch.CLI.fs:1832-1843 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:1720` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×3
  • Duplicated block (8 lines × 3) src/Grace.Actors/Repository.Actor.fs:77 — src/Grace.Actors/Repository.Actor.fs:77-84 | src/Grace.Types/Common.Types.fs:729-736 | src/Grace.Types/Common.Types.fs:866-873 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (8 lines × 3) src/Grace.Server/Branch.Server.fs:546 — src/Grace.Server/Branch.Server.fs:546-553 | src/Grace.Server/Branch.Server.fs:559-566 | src/Grace.Server/Branch.Server.fs:571-578 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (8 lines × 3) src/Grace.Server/Branch.Server.fs:626 — src/Grace.Server/Branch.Server.fs:626-633 | src/Grace.Server/Branch.Server.fs:786-793 | src/Grace.Server/Branch.Server.fs:799-806 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Branch.Server.fs:626` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (23 lines × 2) · ×2
  • Duplicated block (23 lines × 2) src/Grace.Actors/Services.Actor.fs:2304 — src/Grace.Actors/Services.Actor.fs:2304-2326 | src/Grace.Actors/Services.Actor.fs:2372-2394 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/Services.Actor.fs:2304` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (23 lines × 2) src/Grace.Actors/ApprovalRequest.Actor.fs:273 — src/Grace.Actors/ApprovalRequest.Actor.fs:273-295 | src/Grace.Actors/ApprovalRequest.Actor.fs:461-483 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Actors/ApprovalRequest.Actor.fs:273` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:1513 — src/Grace.CLI/Command/Branch.CLI.fs:1513-1531 | src/Grace.CLI/Command/Reference.CLI.fs:970-988 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:1513` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (19 lines × 2) src/Grace.CLI/Command/Branch.CLI.fs:1654 — src/Grace.CLI/Command/Branch.CLI.fs:1654-1672 | src/Grace.CLI/Command/Reference.CLI.fs:1104-1122 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:1654` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (11 lines × 5) · ×2
  • Duplicated block (11 lines × 5) src/Grace.Server/WorkItem.Server.fs:197 — src/Grace.Server/WorkItem.Server.fs:197-207 | src/Grace.Server/Policy.Server.fs:94-104 | src/Grace.Server/Review.Server.fs:855-865 | src/Grace.Server/Queue.Server.fs:74-84 | src/Grace.Server/Queue.Server.fs:169-179 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/WorkItem.Server.fs:197` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 5) src/Grace.Server/WorkItem.Server.fs:233 — src/Grace.Server/WorkItem.Server.fs:233-243 | src/Grace.Server/Policy.Server.fs:139-149 | src/Grace.Server/Review.Server.fs:900-910 | src/Grace.Server/Queue.Server.fs:119-129 | src/Grace.Server/Queue.Server.fs:214-224 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/WorkItem.Server.fs:233` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (10 lines × 5) · ×2
  • Duplicated block (10 lines × 5) src/Grace.Server/Branch.Server.fs:804 — src/Grace.Server/Branch.Server.fs:804-813 | src/Grace.Server/WorkItem.Server.fs:301-310 | src/Grace.Server/Policy.Server.fs:196-205 | src/Grace.Server/Review.Server.fs:957-966 | src/Grace.Server/Queue.Server.fs:271-280 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Branch.Server.fs:804` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 5) src/Grace.Server/WorkItem.Server.fs:222 — src/Grace.Server/WorkItem.Server.fs:222-231 | src/Grace.Server/Policy.Server.fs:128-137 | src/Grace.Server/Review.Server.fs:889-898 | src/Grace.Server/Queue.Server.fs:108-117 | src/Grace.Server/Queue.Server.fs:203-212 — there are 5 copies across 4 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/WorkItem.Server.fs:222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×2
  • Duplicated block (10 lines × 3) src/Grace.Server/Repository.Server.fs:235 — src/Grace.Server/Repository.Server.fs:235-244 | src/Grace.Server/Reminder.Server.fs:81-90 | src/Grace.Server/Reminder.Server.fs:155-164 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.Server/Repository.Server.fs:235` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 3) src/Grace.CLI/Command/Branch.CLI.fs:2585 — src/Grace.CLI/Command/Branch.CLI.fs:2585-2595 | src/Grace.CLI/Command/Branch.CLI.fs:4095-4104 | src/Grace.CLI/Command/Branch.CLI.fs:4708-4717 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/Grace.CLI/Command/Branch.CLI.fs:2585` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D1 · Cyclomatic Complexity · Text.apart (cyclomatic 169) · ×1
  • Text.apart (cyclomatic 169) src/Grace.Shared/Resources/Text/Languages.Resources.fs:336 — Text.apart has cyclomatic complexity 169 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Doctor.resultForCheck (cyclomatic 146) · ×1
  • Doctor.resultForCheck (cyclomatic 146) src/Grace.CLI/Command/Doctor.CLI.fs:888 — Doctor.resultForCheck has cyclomatic complexity 146 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Text.ago (cyclomatic 145) · ×1
  • Text.ago (cyclomatic 145) src/Grace.Shared/Resources/Text/Languages.Resources.fs:167 — Text.ago has cyclomatic complexity 145 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ManifestContributionDiagnosis.diagnoseWith (cyclomatic 144) · ×1
  • ManifestContributionDiagnosis.diagnoseWith (cyclomatic 144) src/Grace.Server/ManifestContributionDiagnosis.Server.fs:338 — ManifestContributionDiagnosis.diagnoseWith has cyclomatic complexity 144 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · BranchActor.Grace.Actors.Interfaces.IBranchActor.Handle (cyclomatic 102) · ×1
  • BranchActor.Grace.Actors.Interfaces.IBranchActor.Handle (cyclomatic 102) src/Grace.Actors/Branch.Actor.fs:570 — BranchActor.Grace.Actors.Interfaces.IBranchActor.Handle has cyclomatic complexity 102 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · GraceCommand.main (cyclomatic 92) · ×1
  • GraceCommand.main (cyclomatic 92) src/Grace.CLI/Program.CLI.fs:1095 — GraceCommand.main has cyclomatic complexity 92 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Watch.processChangedFilesWithClients (cyclomatic 84) · ×1
  • Watch.processChangedFilesWithClients (cyclomatic 84) src/Grace.CLI/Command/Watch.CLI.fs:8335 — Watch.processChangedFilesWithClients has cyclomatic complexity 84 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PromotionSetActor.ComputeAppliedDirectoryVersionForStep (cyclomatic 75) · ×1
  • PromotionSetActor.ComputeAppliedDirectoryVersionForStep (cyclomatic 75) src/Grace.Actors/PromotionSet.Actor.fs:1135 — PromotionSetActor.ComputeAppliedDirectoryVersionForStep has cyclomatic complexity 75 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Watch.processCurrentBranchMaterializationNotification (cyclomatic 59) · ×1
  • Watch.processCurrentBranchMaterializationNotification (cyclomatic 59) src/Grace.CLI/Command/Watch.CLI.fs:6430 — Watch.processCurrentBranchMaterializationNotification has cyclomatic complexity 59 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Subscriber.handleEvent (cyclomatic 53) · ×1
  • Subscriber.handleEvent (cyclomatic 53) src/Grace.Server/Notification.Server.fs:989 — Subscriber.handleEvent has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · DirectoryVersionActor.Grace.Actors.Interfaces.IDirectoryVersionActor.Handle (cyclomatic 50) · ×1
  • DirectoryVersionActor.Grace.Actors.Interfaces.IDirectoryVersionActor.Handle (cyclomatic 50) src/Grace.Actors/DirectoryVersion.Actor.fs:1335 — DirectoryVersionActor.Grace.Actors.Interfaces.IDirectoryVersionActor.Handle has cyclomatic complexity 50 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · UploadSession.decideCommand (cyclomatic 44) · ×1
  • UploadSession.decideCommand (cyclomatic 44) src/Grace.Actors/UploadSession.Actor.fs:1336 — UploadSession.decideCommand has cyclomatic complexity 44 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · RepositoryActor.Grace.Actors.Interfaces.IRepositoryActor.Handle (cyclomatic 43) · ×1
  • RepositoryActor.Grace.Actors.Interfaces.IRepositoryActor.Handle (cyclomatic 43) src/Grace.Actors/Repository.Actor.fs:552 — RepositoryActor.Grace.Actors.Interfaces.IRepositoryActor.Handle has cyclomatic complexity 43 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ManifestContributionRepairMeasurementTests.repair republication restores only the missing Reference root (cyclomatic 43) · ×1
  • ManifestContributionRepairMeasurementTests.repair republication restores only the missing Reference root (cyclomatic 43) src/Grace.Server.Tests/ManifestContributionRepair.Measurement.Tests.fs:200 — ManifestContributionRepairMeasurementTests.repair republication restores only the missing Reference root has cyclomatic complexity 43 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · LocalStateDb.hasRequiredWatchJournalShape (cyclomatic 42) · ×1
  • LocalStateDb.hasRequiredWatchJournalShape (cyclomatic 42) src/Grace.CLI/LocalStateDb.CLI.fs:772 — LocalStateDb.hasRequiredWatchJournalShape has cyclomatic complexity 42 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · LocalStateDb.hasRequiredWatchLifecycleEventShape (cyclomatic 41) · ×1
  • LocalStateDb.hasRequiredWatchLifecycleEventShape (cyclomatic 41) src/Grace.CLI/LocalStateDb.CLI.fs:866 — LocalStateDb.hasRequiredWatchLifecycleEventShape has cyclomatic complexity 41 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ManifestContributionRepair.buildPlan (cyclomatic 40) · ×1
  • ManifestContributionRepair.buildPlan (cyclomatic 40) src/Grace.Server/ManifestContributionRepair.Server.fs:200 — ManifestContributionRepair.buildPlan has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Maintenance.updateIndexHandler (cyclomatic 40) · ×1
  • Maintenance.updateIndexHandler (cyclomatic 40) src/Grace.CLI/Command/Maintenance.CLI.fs:328 — Maintenance.updateIndexHandler has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AspireTestHost.startNewHostAsync (cyclomatic 40) · ×1
  • AspireTestHost.startNewHostAsync (cyclomatic 40) src/Grace.Server.Tests/AspireTestHost.fs:1099 — AspireTestHost.startNewHostAsync has cyclomatic complexity 40 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Program.Main (cyclomatic 39) · ×1
  • Program.Main (cyclomatic 39) src/Grace.Aspire.AppHost/Program.Aspire.AppHost.cs:34 — Program.Main has cyclomatic complexity 39 (threshold 15). Of this number, 37 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ValidateIdsMiddleware.Invoke (cyclomatic 39) · ×1
  • ValidateIdsMiddleware.Invoke (cyclomatic 39) src/Grace.Server/Middleware/ValidateIds.Middleware.fs:70 — ValidateIdsMiddleware.Invoke has cyclomatic complexity 39 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Reference.createReferenceHandler (cyclomatic 38) · ×1
  • Reference.createReferenceHandler (cyclomatic 38) src/Grace.CLI/Command/Reference.CLI.fs:626 — Reference.createReferenceHandler has cyclomatic complexity 38 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ManifestContributionRepair.reconcileCounterWith (cyclomatic 37) · ×1
  • ManifestContributionRepair.reconcileCounterWith (cyclomatic 37) src/Grace.Server/ManifestContributionRepair.Server.fs:584 — ManifestContributionRepair.reconcileCounterWith has cyclomatic complexity 37 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Diff.diffToReferenceType (cyclomatic 36) · ×1
  • Diff.diffToReferenceType (cyclomatic 36) src/Grace.CLI/Command/Diff.CLI.fs:291 — Diff.diffToReferenceType has cyclomatic complexity 36 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · WorkItemActor.Grace.Actors.Interfaces.IWorkItemActor.Handle (cyclomatic 35) · ×1
  • WorkItemActor.Grace.Actors.Interfaces.IWorkItemActor.Handle (cyclomatic 35) src/Grace.Actors/WorkItem.Actor.fs:126 — WorkItemActor.Grace.Actors.Interfaces.IWorkItemActor.Handle has cyclomatic complexity 35 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Watch.uploadPendingWatchFilesForStatusRetry (cyclomatic 34) · ×1
  • Watch.uploadPendingWatchFilesForStatusRetry (cyclomatic 34) src/Grace.CLI/Command/Watch.CLI.fs:8089 — Watch.uploadPendingWatchFilesForStatusRetry has cyclomatic complexity 34 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Branch.rebaseHandler (cyclomatic 34) · ×1
  • Branch.rebaseHandler (cyclomatic 34) src/Grace.CLI/Command/Branch.CLI.fs:4073 — Branch.rebaseHandler has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManifestUpload.uploadFileWithClient (cyclomatic 34) · ×1
  • ManifestUpload.uploadFileWithClient (cyclomatic 34) src/Grace.SDK/ManifestUpload.SDK.fs:273 — ManifestUpload.uploadFileWithClient has cyclomatic complexity 34 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ApprovalRequest.decideCommand (cyclomatic 33) · ×1
  • ApprovalRequest.decideCommand (cyclomatic 33) src/Grace.Actors/ApprovalRequest.Actor.fs:60 — ApprovalRequest.decideCommand has cyclomatic complexity 33 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PromotionSetActor.ApplyPromotionSet (cyclomatic 33) · ×1
  • PromotionSetActor.ApplyPromotionSet (cyclomatic 33) src/Grace.Actors/PromotionSet.Actor.fs:2136 — PromotionSetActor.ApplyPromotionSet has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ReferenceActor.Grace.Actors.Interfaces.IReferenceActor.Handle (cyclomatic 33) · ×1
  • ReferenceActor.Grace.Actors.Interfaces.IReferenceActor.Handle (cyclomatic 33) src/Grace.Actors/Reference.Actor.fs:810 — ReferenceActor.Grace.Actors.Interfaces.IReferenceActor.Handle has cyclomatic complexity 33 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ManifestContributionAccounting.handleReferenceCreatedWith (cyclomatic 33) · ×1
  • ManifestContributionAccounting.handleReferenceCreatedWith (cyclomatic 33) src/Grace.Server/ManifestContributionAccounting.Server.fs:231 — ManifestContributionAccounting.handleReferenceCreatedWith has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Watch.applyCurrentBranchMaterializationTargets (cyclomatic 33) · ×1
  • Watch.applyCurrentBranchMaterializationTargets (cyclomatic 33) src/Grace.CLI/Command/Watch.CLI.fs:5925 — Watch.applyCurrentBranchMaterializationTargets has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManifestContributionRepair.removeStaleRelationshipWith (cyclomatic 32) · ×1
  • ManifestContributionRepair.removeStaleRelationshipWith (cyclomatic 32) src/Grace.Server/ManifestContributionRepair.Server.fs:467 — ManifestContributionRepair.removeStaleRelationshipWith has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · ManifestContributionRedisRestartMeasurementTests.hot manifest converges one Reference after Redis restart (cyclomatic 32) · ×1
  • ManifestContributionRedisRestartMeasurementTests.hot manifest converges one Reference after Redis restart (cyclomatic 32) src/Grace.Server.Tests/ManifestContributionRedisRestart.Measurement.Tests.fs:201 — ManifestContributionRedisRestartMeasurementTests.hot manifest converges one Reference after Redis restart has cyclomatic complexity 32 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · PromotionSetActor.RecomputeSteps (cyclomatic 31) · ×1
  • PromotionSetActor.RecomputeSteps (cyclomatic 31) src/Grace.Actors/PromotionSet.Actor.fs:1688 — PromotionSetActor.RecomputeSteps has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AgentCommand.workStopWith (cyclomatic 31) · ×1
  • AgentCommand.workStopWith (cyclomatic 31) src/Grace.CLI/Command/Agent.CLI.fs:844 — AgentCommand.workStopWith has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LocalStateDb.tryFindWatchJournalReplayIncompatibility (cyclomatic 31) · ×1
  • LocalStateDb.tryFindWatchJournalReplayIncompatibility (cyclomatic 31) src/Grace.CLI/LocalStateDb.CLI.fs:2217 — LocalStateDb.tryFindWatchJournalReplayIncompatibility has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · DeadLetterRuntime.fixtureOwnsEvent (cyclomatic 31) · ×1
  • DeadLetterRuntime.fixtureOwnsEvent (cyclomatic 31) src/Grace.Server.Tests/ManifestContributionDeadLetter.Measurement.Tests.fs:125 — DeadLetterRuntime.fixtureOwnsEvent has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ContentBlockMetadata.mergeRanges (cyclomatic 30) · ×1
  • ContentBlockMetadata.mergeRanges (cyclomatic 30) src/Grace.Actors/ContentBlockMetadata.Actor.fs:213 — ContentBlockMetadata.mergeRanges has cyclomatic complexity 30 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContentBlockMetadata.decideCommand (cyclomatic 30) · ×1
  • ContentBlockMetadata.decideCommand (cyclomatic 30) src/Grace.Actors/ContentBlockMetadata.Actor.fs:657 — ContentBlockMetadata.decideCommand has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Storage.ConfirmContentBlockUpload (cyclomatic 29) · ×1
  • Storage.ConfirmContentBlockUpload (cyclomatic 29) src/Grace.Server/Storage.Server.fs:1974 — Storage.ConfirmContentBlockUpload has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · AgentCommand.workStatusWith (cyclomatic 29) · ×1
  • AgentCommand.workStatusWith (cyclomatic 29) src/Grace.CLI/Command/Agent.CLI.fs:975 — AgentCommand.workStatusWith has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Watch.InvokeAsync (cyclomatic 29) · ×1
  • Watch.InvokeAsync (cyclomatic 29) src/Grace.CLI/Command/Watch.CLI.fs:9290 — Watch.InvokeAsync has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Repository.initHandler (cyclomatic 29) · ×1
  • Repository.initHandler (cyclomatic 29) src/Grace.CLI/Command/Repository.CLI.fs:379 — Repository.initHandler has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Load.main (cyclomatic 29) · ×1
  • Load.main (cyclomatic 29) src/Grace.Load/Program.Load.fs:39 — Load.main has cyclomatic complexity 29 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ManifestContributionRepair.repairWith (cyclomatic 28) · ×1
  • ManifestContributionRepair.repairWith (cyclomatic 28) src/Grace.Server/ManifestContributionRepair.Server.fs:714 — ManifestContributionRepair.repairWith has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · AgentCommand.workStartWith (cyclomatic 28) · ×1
  • AgentCommand.workStartWith (cyclomatic 28) src/Grace.CLI/Command/Agent.CLI.fs:711 — AgentCommand.workStartWith has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Services.getNormalizedIdsAndNames (cyclomatic 28) · ×1
  • Services.getNormalizedIdsAndNames (cyclomatic 28) src/Grace.CLI/Command/Services.CLI.fs:3977 — Services.getNormalizedIdsAndNames has cyclomatic complexity 28 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ManifestContributionWorkflow.decideCommandForKey (cyclomatic 27) · ×1
  • ManifestContributionWorkflow.decideCommandForKey (cyclomatic 27) src/Grace.Actors/ManifestContributionWorkflow.Actor.fs:294 — ManifestContributionWorkflow.decideCommandForKey has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PromotionSetActor.MaterializeMergedDirectoryVersion (cyclomatic 27) · ×1
  • PromotionSetActor.MaterializeMergedDirectoryVersion (cyclomatic 27) src/Grace.Actors/PromotionSet.Actor.fs:913 — PromotionSetActor.MaterializeMergedDirectoryVersion has cyclomatic complexity 27 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · AnnotationLineCore.buildAnnotationWithTraversalBoundary (cyclomatic 27) · ×1
  • AnnotationLineCore.buildAnnotationWithTraversalBoundary (cyclomatic 27) src/Grace.Shared/AnnotationLineCore.Shared.fs:620 — AnnotationLineCore.buildAnnotationWithTraversalBoundary has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · AgentCommand.addSummaryHandler (cyclomatic 27) · ×1
  • AgentCommand.addSummaryHandler (cyclomatic 27) src/Grace.CLI/Command/Agent.CLI.fs:494 — AgentCommand.addSummaryHandler has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Watch.updateGraceStatusFromDifferences (cyclomatic 27) · ×1
  • Watch.updateGraceStatusFromDifferences (cyclomatic 27) src/Grace.CLI/Command/Watch.CLI.fs:7708 — Watch.updateGraceStatusFromDifferences has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UploadSession.trySelectActiveContiguousRangeChain (cyclomatic 26) · ×1
  • UploadSession.trySelectActiveContiguousRangeChain (cyclomatic 26) src/Grace.Actors/UploadSession.Actor.fs:484 — UploadSession.trySelectActiveContiguousRangeChain has cyclomatic complexity 26 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
D1 · Cyclomatic Complexity · Access.parseResource (cyclomatic 26) · ×1
  • Access.parseResource (cyclomatic 26) src/Grace.Server/Access.Server.fs:246 — Access.parseResource has cyclomatic complexity 26 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · HistoryRun.InvokeAsync (cyclomatic 26) · ×1
  • HistoryRun.InvokeAsync (cyclomatic 26) src/Grace.CLI/Command/History.CLI.fs:651 — HistoryRun.InvokeAsync has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LocalStateDb.ensureDbInitialized (cyclomatic 26) · ×1
  • LocalStateDb.ensureDbInitialized (cyclomatic 26) src/Grace.CLI/LocalStateDb.CLI.fs:1495 — LocalStateDb.ensureDbInitialized has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManifestContributionDuplicateBacklogMeasurementTests.isolated duplicate backlog completes exactly and preserves durable state (cyclomatic 26) · ×1
  • ManifestContributionDuplicateBacklogMeasurementTests.isolated duplicate backlog completes exactly and preserves durable state (cyclomatic 26) src/Grace.Server.Tests/ManifestContributionDuplicateBacklog.Measurement.Tests.fs:318 — ManifestContributionDuplicateBacklogMeasurementTests.isolated duplicate backlog completes exactly and preserves durable state has cyclomatic complexity 26 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · OrganizationActor.Grace.Actors.Interfaces.IOrganizationActor.Handle (cyclomatic 25) · ×1
  • OrganizationActor.Grace.Actors.Interfaces.IOrganizationActor.Handle (cyclomatic 25) src/Grace.Actors/Organization.Actor.fs:242 — OrganizationActor.Grace.Actors.Interfaces.IOrganizationActor.Handle has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · OwnerActor.Grace.Actors.Interfaces.IOwnerActor.Handle (cyclomatic 25) · ×1
  • OwnerActor.Grace.Actors.Interfaces.IOwnerActor.Handle (cyclomatic 25) src/Grace.Actors/Owner.Actor.fs:268 — OwnerActor.Grace.Actors.Interfaces.IOwnerActor.Handle has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Storage.hydrateFinalizeEvidenceFromClaimedMetadata (cyclomatic 25) · ×1
  • Storage.hydrateFinalizeEvidenceFromClaimedMetadata (cyclomatic 25) src/Grace.Server/Storage.Server.fs:923 — Storage.hydrateFinalizeEvidenceFromClaimedMetadata has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ValidateIdsDecisions.getEntityValidationErrorMessage (cyclomatic 25) · ×1
  • ValidateIdsDecisions.getEntityValidationErrorMessage (cyclomatic 25) src/Grace.Server/Middleware/ValidateIds.Decisions.fs:121 — ValidateIdsDecisions.getEntityValidationErrorMessage has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Branch.createReferenceHandler (cyclomatic 25) · ×1
  • Branch.createReferenceHandler (cyclomatic 25) src/Grace.CLI/Command/Branch.CLI.fs:1203 — Branch.createReferenceHandler has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Status.InvokeAsync (cyclomatic 25) · ×1
  • Status.InvokeAsync (cyclomatic 25) src/Grace.CLI/Command/Auth.CLI.fs:1362 — Status.InvokeAsync has cyclomatic complexity 25 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · UploadSession.tryCreateContentBlockMetadataMergeCommandsForFinalizedBlocks (cyclomatic 24) · ×1
  • UploadSession.tryCreateContentBlockMetadataMergeCommandsForFinalizedBlocks (cyclomatic 24) src/Grace.Actors/UploadSession.Actor.fs:975 — UploadSession.tryCreateContentBlockMetadataMergeCommandsForFinalizedBlocks has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Watch.processDueLocalObservationCandidates (cyclomatic 24) · ×1
  • Watch.processDueLocalObservationCandidates (cyclomatic 24) src/Grace.CLI/Command/Watch.CLI.fs:3907 — Watch.processDueLocalObservationCandidates has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ContentBlockMetadata.trySelectContiguousRangeEvidence (cyclomatic 23) · ×1
  • ContentBlockMetadata.trySelectContiguousRangeEvidence (cyclomatic 23) src/Grace.Types/ContentBlockMetadata.Types.fs:327 — ContentBlockMetadata.trySelectContiguousRangeEvidence has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ManifestContributionRepair.repairMissingRelationshipWith (cyclomatic 23) · ×1
  • ManifestContributionRepair.repairMissingRelationshipWith (cyclomatic 23) src/Grace.Server/ManifestContributionRepair.Server.fs:368 — ManifestContributionRepair.repairMissingRelationshipWith has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · ManifestContributionDiagnosis.validateParameters (cyclomatic 23) · ×1
  • ManifestContributionDiagnosis.validateParameters (cyclomatic 23) src/Grace.Server/ManifestContributionDiagnosis.Server.fs:168 — ManifestContributionDiagnosis.validateParameters has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Create.InvokeAsync (cyclomatic 23) · ×1
  • Create.InvokeAsync (cyclomatic 23) src/Grace.CLI/Command/Branch.CLI.fs:610 — Create.InvokeAsync has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · LocalStateDb.readWatchJournalSnapshot (cyclomatic 23) · ×1
  • LocalStateDb.readWatchJournalSnapshot (cyclomatic 23) src/Grace.CLI/LocalStateDb.CLI.fs:1713 — LocalStateDb.readWatchJournalSnapshot has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · LocalStateDb.readStatusSnapshotReadOnly (cyclomatic 23) · ×1
  • LocalStateDb.readStatusSnapshotReadOnly (cyclomatic 23) src/Grace.CLI/LocalStateDb.CLI.fs:3532 — LocalStateDb.readStatusSnapshotReadOnly has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Repair.validateExecute (cyclomatic 23) · ×1
  • Repair.validateExecute (cyclomatic 23) src/Grace.Server.Unit.Tests/ManifestContributionMeasurement.fs:560 — Repair.validateExecute has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · DeadLetterRuntime.inventoryDefaultReferenceProducerAsync (cyclomatic 23) · ×1
  • DeadLetterRuntime.inventoryDefaultReferenceProducerAsync (cyclomatic 23) src/Grace.Server.Tests/ManifestContributionDeadLetter.Measurement.Tests.fs:179 — DeadLetterRuntime.inventoryDefaultReferenceProducerAsync has cyclomatic complexity 23 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · UploadSessionActor.Grace.Actors.Interfaces.IUploadSessionActor.Handle (cyclomatic 22) · ×1
  • UploadSessionActor.Grace.Actors.Interfaces.IUploadSessionActor.Handle (cyclomatic 22) src/Grace.Actors/UploadSession.Actor.fs:1906 — UploadSessionActor.Grace.Actors.Interfaces.IUploadSessionActor.Handle has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UploadSessionActor.PrevalidateFinalizedContentBlockMetadata (cyclomatic 22) · ×1
  • UploadSessionActor.PrevalidateFinalizedContentBlockMetadata (cyclomatic 22) src/Grace.Actors/UploadSession.Actor.fs:1528 — UploadSessionActor.PrevalidateFinalizedContentBlockMetadata has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · PromotionSetActor.EnsureApprovalAllowsApply (cyclomatic 22) · ×1
  • PromotionSetActor.EnsureApprovalAllowsApply (cyclomatic 22) src/Grace.Actors/PromotionSet.Actor.fs:1985 — PromotionSetActor.EnsureApprovalAllowsApply has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Program.createHostBuilder (cyclomatic 22) · ×1
  • Program.createHostBuilder (cyclomatic 22) src/Grace.Server/Program.Server.fs:165 — Program.createHostBuilder has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · EventingPublisher.tryCreateEnvelope (cyclomatic 22) · ×1
  • EventingPublisher.tryCreateEnvelope (cyclomatic 22) src/Grace.Server/Eventing.Server.fs:100 — EventingPublisher.tryCreateEnvelope has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · History.filterEntries (cyclomatic 22) · ×1
  • History.filterEntries (cyclomatic 22) src/Grace.CLI/Command/History.CLI.fs:176 — History.filterEntries has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ManifestContributionServerRestartMeasurementTests.isolated persisted envelope completes after Grace Server restart (cyclomatic 22) · ×1
  • ManifestContributionServerRestartMeasurementTests.isolated persisted envelope completes after Grace Server restart (cyclomatic 22) src/Grace.Server.Tests/ManifestContributionServerRestart.Measurement.Tests.fs:229 — ManifestContributionServerRestartMeasurementTests.isolated persisted envelope completes after Grace Server restart has cyclomatic complexity 22 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Services.getReminders (cyclomatic 21) · ×1
  • Services.getReminders (cyclomatic 21) src/Grace.Actors/Services.Actor.fs:3579 — Services.getReminders has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · PromotionSetConflictModel.tryParseModelResponse (cyclomatic 21) · ×1
  • PromotionSetConflictModel.tryParseModelResponse (cyclomatic 21) src/Grace.Types/PromotionSet.Types.fs:423 — PromotionSetConflictModel.tryParseModelResponse has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ContentBlockMetadata.findRangeEvidence (cyclomatic 21) · ×1
  • ContentBlockMetadata.findRangeEvidence (cyclomatic 21) src/Grace.Types/ContentBlockMetadata.Types.fs:503 — ContentBlockMetadata.findRangeEvidence has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Access.parseScope (cyclomatic 21) · ×1
  • Access.parseScope (cyclomatic 21) src/Grace.Server/Access.Server.fs:147 — Access.parseScope has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Storage.FinalizeManifestUpload (cyclomatic 21) · ×1
  • Storage.FinalizeManifestUpload (cyclomatic 21) src/Grace.Server/Storage.Server.fs:2095 — Storage.FinalizeManifestUpload has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Branch.buildEffectiveHistory (cyclomatic 21) · ×1
  • Branch.buildEffectiveHistory (cyclomatic 21) src/Grace.Server/Branch.Server.fs:224 — Branch.buildEffectiveHistory has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Watch.validateCurrentBranchMaterializationAcceptedMetadata (cyclomatic 21) · ×1
  • Watch.validateCurrentBranchMaterializationAcceptedMetadata (cyclomatic 21) src/Grace.CLI/Command/Watch.CLI.fs:5077 — Watch.validateCurrentBranchMaterializationAcceptedMetadata has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Watch.currentBranchMaterializationStatusGate (cyclomatic 21) · ×1
  • Watch.currentBranchMaterializationStatusGate (cyclomatic 21) src/Grace.CLI/Command/Watch.CLI.fs:6348 — Watch.currentBranchMaterializationStatusGate has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Branch.branchSwitchWatchCleanPreflightRefusalReason (cyclomatic 21) · ×1
  • Branch.branchSwitchWatchCleanPreflightRefusalReason (cyclomatic 21) src/Grace.CLI/Command/Branch.CLI.fs:2909 — Branch.branchSwitchWatchCleanPreflightRefusalReason has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Auth.buildAuthStatus (cyclomatic 21) · ×1
  • Auth.buildAuthStatus (cyclomatic 21) src/Grace.CLI/Command/Auth.CLI.fs:1085 — Auth.buildAuthStatus has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Common.renderOutput (cyclomatic 21) · ×1
  • Common.renderOutput (cyclomatic 21) src/Grace.CLI/Command/Common.CLI.fs:1108 — Common.renderOutput has cyclomatic complexity 21 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ManifestContributionGroupedMeasurementTests.grouped exact head run composes every accepted leaf (cyclomatic 21) · ×1
  • ManifestContributionGroupedMeasurementTests.grouped exact head run composes every accepted leaf (cyclomatic 21) src/Grace.Server.Tests/ManifestContributionGrouped.Measurement.Tests.fs:109 — ManifestContributionGroupedMeasurementTests.grouped exact head run composes every accepted leaf has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · ManifestContributionBaselineMeasurementTests.isolated Baseline emits truthful completed evidence (cyclomatic 21) · ×1
  • ManifestContributionBaselineMeasurementTests.isolated Baseline emits truthful completed evidence (cyclomatic 21) src/Grace.Server.Tests/ManifestContributionBaseline.Measurement.Tests.fs:892 — ManifestContributionBaselineMeasurementTests.isolated Baseline emits truthful completed evidence has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · RepositoryContentCounter.decideRepairForKey (cyclomatic 20) · ×1
  • RepositoryContentCounter.decideRepairForKey (cyclomatic 20) src/Grace.Actors/RepositoryContentCounter.Actor.fs:229 — RepositoryContentCounter.decideRepairForKey has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · RepositoryContentCounter.handleWithRecentResult (cyclomatic 20) · ×1
  • RepositoryContentCounter.handleWithRecentResult (cyclomatic 20) src/Grace.Actors/RepositoryContentCounter.Actor.fs:328 — RepositoryContentCounter.handleWithRecentResult has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Storage.loadClaimedMetadataForFinalizeWith (cyclomatic 20) · ×1
  • Storage.loadClaimedMetadataForFinalizeWith (cyclomatic 20) src/Grace.Server/Storage.Server.fs:818 — Storage.loadClaimedMetadataForFinalizeWith has cyclomatic complexity 20 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.