Repository navigation
Conversation
Rewrite requires, tests, docs and path configuration for the move of harnesses/ into src/main/harnesses. Directory-index requires of the registry were rewritten by hand: the codemod only maps file specifiers. The build.files, ESLint, module-paths and changelog-path entries for harnesses/ are dropped, since src/** already covers the new location. Record the pure-move commit in .git-blame-ignore-revs.
# Conflicts: # docs/changelog.md
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.
Board card: #1357
Step 10 of ADR 0005: move the harnesses context (the CLI harness contract and its adapters) into
src/main/harnesses/. Paths only, no behaviour change. Merge with a merge commit so the pure-move commit stays in history.Moved files
harnesses/claude.js->src/main/harnesses/claude.jsharnesses/codex.js->src/main/harnesses/codex.jsharnesses/contract.js->src/main/harnesses/contract.jsharnesses/index.js->src/main/harnesses/index.jsThe ADR's
harnesses/claude/subdirectory is not created here. The Claude adapter is still one file. Claude-only root modules (claude-binary.js,claude-auth.js,bridge-session-id.js) have consumers in terminals, usage, bg-agents and session state, so they are not moved in this step.Commits
b2b2b8a2f4c1e1383c7c88b8284cbb3d6ed8944b: puregit mv, four R100 renames, 0 insertions and 0 deletions.2f6d7f549f1859ea85dd28c35c77431a9dbff1bc: reference updates, plus the commit 1 SHA in.git-blame-ignore-revs.06ffcbc4: merge oforigin/mainafter (docs): tie each doc to the code it covers and require it in PRs that change that code (#1353) #1364; itscovers:paths moved tosrc/main/harnesses/(.ai/contexts/cli-harnesses.md,docs/launching-sessions.md) andharnesses/dropped from the app-path lists indocs/changelog.md. After the merge: check-docs 99/99, check-doc-refs 16/16, module-layout 7/7, move-modules 59/59, harness-contract 10/10, check-changelog 21/21;check-docs.js --validateandcheck-doc-refs.jspass.References updated
scripts/move-modules.js) rewrote every file specifier. It does not map directory-index specifiers, so I rewroterequire('./harnesses')and its../and../../forms by hand inmain.js,session-cache.js,session-index-commands.js,session-transitions.js,src/main/session-index/full-read-state.js,workers/scan-projects.js,workers/session-index-writer.js,test/fixtures/trigger-main-open.cjsand 20 test files.harnesses/**frompackage.jsonbuild.files(covered bysrc/**/*). Droppedharnesses/**/*.jsfrom the ESLint main-process block (covered bysrc/main/**/*.js). Dropped theharnesseswalk root fromscripts/module-paths.jsand theharnesses/prefix fromscripts/check-changelog.jsisAppPath, sincesrc/covers both.test/harness-contract.test.jsnow asserts thatbuild.filesshipssrc/**/*. Intest/module-layout.test.js, the codemod had rewritten a syntheticharnesses/claude.jsfixture intosrc/, which broke thewalk(root, 'src')expectation. That test went red locally. I removed the fixture, because the walk root it exercised no longer exists..ai/contexts/{cli-harnesses,build-release,session-cache,session-index-writer,managed-browser,trigger-watcher}.md,docs/changelog.md,docs/development.mdanddocs/launching-sessions.md.scripts/doc-refs-allow.json: removed theharnesses/claude/entry for ADR 0005.check-doc-refsreported it as unused once theharnessesdirectory was gone.Worker entry paths are unchanged: no
new WorkerorutilityProcesspath moved. Only the requires insideworkers/scan-projects.jsandworkers/session-index-writer.jschanged.build.filesdid change (an entry was removed), so per ADR 0005 a packaged build needs to be checked before merge.Verification (Node 22, local, worktree)
node scripts/move-modules.js --checkwith the source map present: exit 0 after the rewrite. The warnings left are the pre-existing excerpt andindex.jssegment warnings. I reviewed them and none involves the harness registry.node --checkon 46 changed or moved JS files: 0 failures.main.js.node scripts/check-doc-refs.js: 0 failures, 0 allow-list errors.git diff --check: clean.task check:fastwithSKIP_TESTS=1before each commit: exit 0.Not verified
test/fixtures/trigger-main-open.cjsandtest/fixtures/warm-start-1152.cjs.build.fileslostharnesses/**(now covered bysrc/**/*); to be checked on a packaged build before merge (ADR 0005).Docs
Updated
.ai/contexts/cli-harnesses.md,build-release.md,session-cache.md,session-index-writer.md,managed-browser.md,trigger-watcher.md,docs/changelog.md,docs/development.mdanddocs/launching-sessions.md. No user docs needed changes, because nothing users see changes.No changelog entry: nothing users see changes (
no-changelog).