PLN-392: Complete 73-file drift audit and annotation closure#134
Merged
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
79bb7a6 to
0ed702b
Compare
- Audited all 73 test files in apps/desktop/test/ against production sources; 63 files have no drift patterns, 10 are annotated - Annotated drift-check headers in boot-recovery, codex-log-parsing, codex-spawn-enoent, error-handlers, git-helpers-shell-safety, spawn-enoent-characterization, spawn-retry, and spawn-hardening - Vocabulary decision adopted: two-form standard -- // drift-check: matches for Class (i) line-anchor annotations, // drift-check: replicates for Class (ii) pattern-replication sites. Applied consistently to spawn-enoent-characterization (489, 1047), spawn-hardening tests (b)/(c)/(d) (489, 1047, codex.ts:1985, learnings.ts:264), reflecting the entire pattern-replication surface per PRD-220 vocabulary rationale. - Fixed boot-recovery.test.ts annotation anchor: :303 -> :308 (isProcessRunning(pid) line in boot-recovery.ts) - Swept stale prose contradictions in codex-spawn-enoent.test.ts header block (lines 17-23) so prose line citations no longer contradict adjacent // drift-check: annotations - Added JSDoc on makeEnoentError documenting code: 'ENOENT' and syscall: 'spawn' fields, with note for callers needing a syscall-free shape - New: apps/desktop/test/DRIFT-AUDIT.md -- in-tree mirror of the audit table for downstream FEA-618/619/621 to consume without reaching for PR description archives - CLAUDE.md: added a pointer to the new DRIFT-AUDIT.md under Learned Patterns - apps/desktop/package.json: patch version bump 0.13.20 -> 0.13.21 Testing: just desktop-typecheck, just desktop-lint, just desktop-test all expected to pass; this PR is annotation-only with no production source changes. Risks: None identified -- changes confined to test annotations, test/helpers JSDoc, a new in-tree audit document, a CLAUDE.md pointer, and a desktop package patch version bump. No production runtime code modified.
0ed702b to
19c9163
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
This was referenced May 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR closes the test-drift audit work tracked under PLN-392 / FEA-688. It targets
symphony/prd-220(the PRD-220 integration branch) so the audit record lands alongside the policy it validates.apps/desktop/test/against current production sourcesDRIFT ANNOTATIONheaders on the 8 files with drift patterns (boot-recovery, codex-log-parsing, codex-spawn-enoent, error-handlers, git-helpers-shell-safety, spawn-enoent-characterization, spawn-hardening, spawn-retry); the remaining 65 files are classifiedno drift patterns// drift-check: matches/// drift-check: replicates) and applies it consistently across all annotated sitescodex-spawn-enoent.test.ts:17-23boot-recovery.test.tsannotation anchor (:303→:308, the actualisProcessRunning(pid)line)makeEnoentErrordocumenting the always-presentcode: 'ENOENT'andsyscall: 'spawn'fieldsapps/desktop/test/DRIFT-AUDIT.md— in-tree authoritative copy of the audit table for downstream FEA-618 / FEA-619 / FEA-621 to consume without depending on PR description archivesCLAUDE.md: adds a pointer toDRIFT-AUDIT.mdunder the Learned Patterns sectionVocabulary Decision
Two-form standard adopted:
matches// drift-check: matches codex.ts:1767replicates// drift-check: replicates symphony-interactive.ts:672-688Rationale:
The PRD-220 schema defines two drift classes. Class (i) tests are observers — they cite a line so a reviewer can locate the production anchor; they do not reproduce any logic. The verb "matches" conveys that the annotation is a line-pointer that should stay in sync. Class (ii) tests are replicators — they contain test-side implementations that shadow production behavior and will silently diverge if production changes without a corresponding test update. The verb "replicates" makes the replication relationship explicit and flags higher maintenance risk.
Using two distinct verbs means a
grepforreplicatesimmediately surfaces the high-risk set without scanning alldrift-checkannotations.replicatesis applied to every site that copies production logic regardless of current alignment — so FEA-621's drift-check script can monitor the entire pattern-replication surface rather than only the drifted subset. (This is whyspawn-hardening.test.tstests (b)/(c)/(d) all usereplicateseven though their patterns are still aligned with production at audit time.)Drift Audit Table
The full 73-file audit table is now maintained in-tree at
apps/desktop/test/DRIFT-AUDIT.md.Summary:
matches)replicates)spawn-hardening.test.ts)Files with
setShellPathForTest()restoration applied in PR #132 (loop-finalizer.test.ts,symphony-loop-auto-clone.test.ts) are now classifiedno drift patternssince the Class (iii) drift was already remediated and they no longer need a fix.Changes
Test annotations
apps/desktop/test/boot-recovery.test.ts— drift-check header annotated; anchor corrected:303→:308apps/desktop/test/codex-log-parsing.test.ts— drift-check header annotatedapps/desktop/test/codex-spawn-enoent.test.ts— drift-check header annotated; stale prose at lines 17-23 sweptapps/desktop/test/error-handlers.test.ts— drift-check header annotatedapps/desktop/test/git-helpers-shell-safety.test.ts— drift-check header annotatedapps/desktop/test/spawn-enoent-characterization.test.ts— drift-check header annotated;// drift-check:annotations converted frommatches→replicatesfor vocabulary consistencyapps/desktop/test/spawn-hardening.test.ts— drift-check header updated to document tests (b)/(c)/(d) as intentional-and-current pattern-replication;// drift-check:annotations on tests (b)/(c)/(d) converted frommatches→replicatesapps/desktop/test/spawn-retry.test.ts— drift-check header annotatedHelpers
apps/desktop/test/helpers/spawn-test-utils.ts— JSDoc onmakeEnoentErrordocumenting always-presentcode: 'ENOENT'andsyscall: 'spawn'fields; note for callers needing asyscall-free shapeDocumentation
apps/desktop/test/DRIFT-AUDIT.md— in-tree authoritative audit tableCLAUDE.md— pointer toDRIFT-AUDIT.mdunder Learned PatternsTest Plan
just desktop-typecheck(verified locally — clean)just desktop-lintjust desktop-testRisks
Low — annotation-only changes to test files plus a new in-tree documentation file and a
CLAUDE.mdpointer. No production runtime code is modified. No test assertions are removed or modified; all changes are to header comments, inline// drift-check:annotations, JSDoc, and prose.Loop ID: 019dd5d6-3153-718d-95b5-362d15fa8b3b
Artifact: https://app.closedloop.ai/implementation-plans/PLN-392