fix(harness): avoid Home lookup for project outputs - #27
Merged
Conversation
Resolve the user Home only when record-fix-output validates a Global target, allowing Project-only results to remain recordable in restricted environments. Add isolated Project and Global CLI regressions, document the behavior in docs/specs/2026-07-30-project-output-home-resolution.md, and validate the focused, full, documentation, and package gates. Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
phodal
approved these changes
Jul 30, 2026
phodal
left a comment
Member
There was a problem hiding this comment.
Ready to merge. The implementation keeps the existing file and containment guards while resolving Home only for Global output. The spec and AC-1 through AC-3 match the diff. CI is green on Windows, macOS, and Linux; independent validation passed the focused tests (10/10), doc-link checks (6/6), full suite (915/915), and package verification.
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
Resolve Home only when validating a Global output target, so verified Project-only results remain recordable when the process Home directory is unavailable. Existing file and scope-containment checks remain unchanged.
Why
Traceability and Scope
docs/specs/2026-07-30-project-output-home-resolution.mdscripts/harness-analysis/record-fix-output.mjs,test/task-loop-report.test.mjs, the behavior spec, andCHANGELOG.md.Change Type
Test and Review Evidence
node --test --test-name-pattern="record-fix-output" test/task-loop-report.test.mjsnode --test test/task-loop-report.test.mjsnode --test test/doc-link-graph.test.mjsnpm testnpm run pack:verifygit diff --check origin/main..HEADManual or visual evidence: Temporarily restoring eager Home resolution made the new Project-only child-process regression fail with exit code 1. With this change, the Project-only case succeeds, while an unavailable Home still fails for Global output without modifying the report.
Risk and Recovery
os.homedir()/realpath()until a Global target is encountered. Existing canonical-path containment and file-existence checks are unchanged. Windows was tested locally; CI should confirm macOS and Linux.CHANGELOG.md.0df03e7.v22.17.0and npm10.9.2are below the repository minimums, so CI must confirm the supported runtime matrix. Open PR feat(harness): support monorepo workspace topology #21 touches the same validation area and may require a rebase if it lands first.AI Involvement
Checklist
AGENTS.md,CONTRIBUTING.md, and the relevant canonical-owner guidance.CHANGELOG.md.