SpecsCLIIssue 69 Project Owned Wiki Sync
Implementation Notes
Implementation Notes
Summary
- Issue #69 is complete:
runUpdatepreserves an existing project-ownedapps/wiki/scripts/sync-content.mjs, reports and restores it when missing, and continues to manage other wiki scaffold drift. Operator docs and the routed runbook state that boundary; final tests, typecheck, and diff validation pass.
Execution Mode
- sequential
Deviations From the Plan
- None.
Surprises and Decisions
- The GREEN fixture must create the existing project-owned script explicitly because update no longer creates that excluded file.
apps/wiki/package.jsonis the positive control because wiki alignment actively repairs its build script; a free-formsource.config.tsedit is preserved by the staging path.- Structured autoreview found that unconditional ownership also hid a missing sync script. The accepted correction is existence-sensitive ownership: preserve a present custom script, but report and recreate an absent one.
Sanity Checks
| Check | Result | Notes |
|---|---|---|
| T1 RED | Expected failure | Exact plan command exited 1 because cleanCheck.changedFiles included the customized sync script. |
| T1 RED, missing script | Expected failure | Exact plan command exited 1 because deleting the script produced no missing-file drift. |
| T1 GREEN | Passed | Exact plan command passed: 1 test passed, 34 skipped. |
| T1 GREEN, missing script | Passed | Exact plan command passed after existence-sensitive ownership: 1 test passed, 34 skipped. |
| Legacy alignment regression | Passed | Targeted aligns existing wiki structure during update passed after asserting custom script preservation. |
| Full update test file | Passed | 35 tests passed. |
| CLI typecheck | Passed | tsc --noEmit exited 0. |
| Scoped whitespace | Passed | git diff --check reported no errors in the issue code/spec files. |
| T3 docs ingest | Passed | All three docs surfaces agree; routed ingest bookkeeping and the cross-session gotcha note are current. |
| Final update test file | Passed | /opt/homebrew/bin/bun run --cwd apps/cli test src/update/run.test.ts passed 35/35. |
| Final CLI typecheck | Passed | /opt/homebrew/bin/bun run --cwd apps/cli check-types exited 0. |
| Final repository diff check | Passed | git diff --check exited 0. |
Extra hi check | External noise | Exited 1 after remote stable advanced to 2026.07.10-explicit-phase-invocation; it also reported intentional in-task managed docs/settings changes. No issue behavior failed. |
UI Evidence Links
- Not applicable: CLI-only behavior change.
Visual Evidence Acceptance Map
- Not applicable: CLI-only behavior change.
Acceptance Criteria Status
| Criterion | Status | Notes |
|---|---|---|
| 1-4 | Met | T1 proves clean check, positive managed drift, apply preservation, and revised legacy behavior. |
| 5 | Met | Focused/full update tests and CLI typechecking pass. |
| 6 | Met | T3 updated the root docs, operator runbook, and canonical routed runbook. |
Manual Review Checklist
| Area | Check | How to perform | Expected result |
|---|---|---|---|
| CLI update | Existing project-authored sync script | In a disposable scaffold fixture, put a unique sentinel in apps/wiki/scripts/sync-content.mjs; run hi update --check; introduce managed wiki package drift and run hi update --write. | The script is absent from changed/stale results, the sentinel survives write mode, and the other managed drift is repaired. |
| CLI update | Missing sync script | In the disposable fixture, delete apps/wiki/scripts/sync-content.mjs; run hi update --check, then hi update --write. | Check reports the exact path as missing and non-clean; write mode recreates the default script. |
Pre-existing Issues
- None affecting issue #69 behavior or validation.
Out of Scope Observations
- Remote stable advanced mid-task from the recorded
2026.07.09-backend-domain-guardrailsbaseline to2026.07.10-explicit-phase-invocation. The resultinghi checkfailure is external scaffold/release drift plus intentional working-tree changes; remediation was deliberately skipped.
Remaining Work
- None for issue #69.
Steering
| Date | Feedback | Changes |
|---|---|---|
| 2026-07-10 | Execute T1 only in sequential mode. | Limited work to the public regression, exact-path implementation, and T1 evidence. |
| 2026-07-10 | Finalize closeout artifacts from parent T4 evidence. | Recorded final validation, external hi check noise, acceptance audit, and no remaining issue-scoped work. |