docs/plans/2026-07-16-systematic-simplification-audit-results.md
104043e2d220336d37c96623229640233093f045The non-sync codebase audit and full portfolio review are complete. Discovery itself was read-only: no production, test, configuration, dependency, or generated source was changed during the audit. The later implementation batch is recorded separately below.
The durable decision record contains the authoritative 100-item order and, under every candidate, the reconciled scope, corrected LOC categories, material corrections, primary gate, and required verification. Discovery-era estimates are retained there only as traceability and are superseded where the full review differs. Raw manifests and reviewer artifacts remain in the ignored local .tmp workspace, so this commit does not independently reproduce the campaign.
| Scope | Files | LOC | Result |
|---|---|---|---|
| Eligible production | 1,942 | 249,318 | Accounted for |
| Eligible tests | 727 | 193,420 | Accounted for |
| Hard-excluded, primarily sync/op-log | 1,049 | 364,604 | Outside audit scope |
| Generated | 362 | 100,556 | Outside manual-code audit |
| Non-code | 583 | — | Classified, not audited for LOC reduction |
| All tracked files | 4,663 | — | Fully classified |
The coverage ledger contains 2,665 reviewed paths and four semantic-excluded paths, with no missing, duplicate, unexpected, or hard-excluded manifest entries. The four semantic exclusions are:
src/app/util/app-data-mock.ts — persisted AppDataComplete/op-log validation contract.src/app/util/check-fix-entity-state-consistency.ts — persisted repair, logging, and error semantics in op-log consumers.src/app/util/chunk-array.ts — only production consumer is the excluded operation-log upload path.src/app/util/debounce-during-startup.operator.ts — contract is initial-sync timing through SyncTriggerService.The final order keeps the original three placements for the 73 scopes that did not materially change and replaces the stale placements for the 27 revised C06/C07 scopes with three fresh independent global placements. Mean applicable placement controls within the actionable, deferred, and rejected bands; exact ties prefer lower risk, then lower effort, then higher reconciled priority, then candidate ID.
| Band | Ranks | Count | Meaning |
|---|---|---|---|
| Tier A | 1–73, interleaved with Tier B by risk/reward | 33 | Higher-confidence, lower-risk actionable work |
| Tier B | 1–73, interleaved with Tier A by risk/reward | 40 | Actionable with greater risk, effort, or uncertainty |
| Tier C | 74–85 | 12 | Deferred pending stronger evidence or value |
| Reject | 86–100 | 15 | Do not implement as described |
The next five open findings are C01-005, C02-005, C04-001, C01-006, and C04-007. Their scopes are documented as disjoint, but each should remain its own change and verification boundary.
The three recommended non-overlapping changes were implemented and verified on 2026-07-17, then stashed at the user's request. They are not present in the current worktree. The patch is stash object 11043158b95aee6a44dfcf4e69315abda4b88704 with message codex: verified simplification implementation batch; it was stash@{0} at audit time, but stash ordinals are mutable and local:
The original forecast used file-level categories that did not consistently separate comments and blank lines, so it is not repeated as categorized evidence. The line-level actual below controls.
They have no dependency edge or file overlap. Their verified status is evidence that lowers residual uncertainty; it is not a separate LOC or reward bonus.
Minimum verification:
checkFile on changed TypeScript; run focused stringToMs, duration-input, directive, Formly-duration, short-syntax, and Add Task Bar tests; run the frontend production build.Actual schema-aligned implementation diff:
Deleted lines are classified individually: blank and comment-only lines take precedence, and each remaining nonblank line is assigned to production code, test code, or test-infrastructure code by file role.
| Category | Added | Deleted | Net reduction |
|---|---|---|---|
| Production code | 1 | 222 | 221 |
| Test code | 0 | 125 | 125 |
| Test-infrastructure code | 0 | 82 | 82 |
| Comment-only lines | 0 | 34 | 34 |
| Blank lines | 0 | 51 | 51 |
| Physical diff total | 1 | 514 | 513 |
C01-002's line-level actual is 132 production-code deletions, 125 test-code deletions, 20 comment-only deletions, and 33 blank-line deletions, plus one production-code insertion. Review confirmed that every deleted line is within the challenged dead-pipe, provider, mock, and unused-parameter scope.
Verification completed:
checkFile passed for every modified TypeScript file.git diff --check passed.Use the final 100-item order in the durable decision record. It replaces the earlier top-12 and provisional follow-up lists that were recorded here before the full review.
HEAD.The audit independently confirmed or overlapped with existing work rather than rediscovering it silently:
Current open work changed candidate classification or requires revalidation:
NoteComponent cleanup.GitHub state was checked on 2026-07-16. Recheck immediately before implementation.
The exclusion guardian found ten overlap groups and applied 15 corrections:
The principal duplicate groups were focus-overlay teardown, planner projection SCSS, global Sass cleanup, GlobalConfigService signal cleanup, and provider build scripts. LOC from those groups is counted once.
This audit intentionally excludes sync systems, including op-log, SuperSync, WebDAV, two-way-sync implementation/migrations, sync-conflict handling, vector clocks, sync E2E, and native sync surfaces.
Checks performed:
The campaign executed:
Artifacts are stored under the ignored directory:
.tmp/simplification-audit/104043e2d220336d37c96623229640233093f045/
Key entries:
baseline.json, scope-manifest.csv, scout-manifest.csv, coverage.csvraw/ — 116 vertical artifacts (108 schema-v2 and eight calibration-era/pre-v2 records)lenses/ — 12 blind horizontal artifactscanonical/ — C01–C08 consolidation and guardian recordsfull-review/safety-C01.json through safety-C07.json — safety/correctness verdictsfull-review/maint-C01.json through maint-C07.json — blind maintainability/value verdictsfull-review/consensus-*.json — conservative reconciliationsfull-review/global-rank-R1.json through global-rank-R3.json — complete independent rankingsfull-review/manual-reconcile-C06.json and manual-reconcile-C07-*.json — controlling scope and score overrides for 27 mechanically ambiguous C06/C07 recordsfull-review/manual-reconcile-rejections.json — neutralized implementation guidance for all 15 rejected recordsfull-review/manual-reconcile-implemented-loc.json — exact line-level category corrections for the verified implementation batchfull-review/final-scope-rank-*.json — three focused replacement placement passes for those 27 recordsThe three-item first batch is verified, independently reviewed, and stored in the local stash identified above. Keep candidates independently reviewable when organizing commits or pull requests. The next five open findings are C01-005, C02-005, C04-001, C01-006, and C04-007; revalidate each against the eventual landing state before implementation so stale consumers, gates, or overlapping LOC are never missed.