docs(#1102): document harness host_files execution order constraints - #1103
docs(#1102): document harness host_files execution order constraints#1103fullsend-ai-coder[bot] wants to merge 2 commits into
Conversation
Add a "Harness execution lifecycle" section to the code-implementation skill documenting the four-phase execution order: config load/validation, pre-script, sandbox setup, agent execution. This addresses a systematic documentation gap that caused a multi-day incident on PR #1075, where the code agent added a host_files entry pointing to a file created by a pre-script — the harness loader rejected the config at load time because the file did not yet exist. The new section documents that host_files entries are validated at config load time (before pre-scripts run), so files created by pre-scripts must use `optional: true` and dynamic path variables like `${RUNNER_TEMP}` instead of hardcoded `/tmp`. Includes correct and incorrect YAML examples. Also updates docs/code.md to reflect the four-phase pipeline (adding config load as step 1) with a cross-reference to the skill docs. Regenerates .skillsaw-baseline.json to accommodate the increased token count in the skill file. Closes #1102
|
🤖 Finished Review · ✅ Success · Started 5:44 PM UTC · Completed 6:04 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.93 |
|
Risk Assessment: moderate (2/5) DetailsDocs-only PR by a known bot adding harness execution-order documentation to satisfy all acceptance criteria of a same-day issue; moderate score driven by the high churn and multi-author contention on the touched files (Tier 2), offset by zero security/CI/dependency signals, full acceptance criteria coverage, and trivial rollback risk. Previous runRisk Assessment: moderate (2/5) DetailsDocs-only PR by a known bot adding harness execution-order documentation to satisfy all acceptance criteria of a same-day issue; moderate score driven by the high churn and multi-author contention on the touched files (Tier 2), offset by zero security/CI/dependency signals, full acceptance criteria coverage, and trivial rollback risk. |
ReviewFindingsMedium
Previous runReviewFindingsMedium
Low
Next steps:
|
|
🤖 Finished Fix · ✅ Success · Started 6:06 PM UTC · Completed 6:14 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $1.41 |
- Update README.md architecture section from three-phase to four-phase pipeline, adding Config load as step 1 - Clarify host_files timing constraint in code-implementation skill to distinguish top-level entries (validated at config load) from conditional overlay entries (resolved after overlay evaluation) - Update harness/code.yaml header comment to note config load occurs before the runtime flow Addresses #1103
🔧 Fix agent — iteration 1 (bot-triggered)Addressed 3 of 4 review findings with fixes: updated README.md phase count from three to four, clarified SKILL.md host_files timing to distinguish top-level vs overlay entries, and updated harness/code.yaml header comment to reference config load. Disagreed with the protected-path finding as it is informational and requires human approval which the fix agent cannot provide. Fixed (3):
Disagreed (1):
Tests: passed Decision points
Next steps:
|
|
🤖 Finished Review · ✅ Success · Started 6:16 PM UTC · Completed 6:37 PM UTC Commit: Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $6.05 |
Superseded by updated review
Summary
skills/code-implementation/SKILL.mddocumenting the four-phase execution order: config load/validation → pre-script → sandbox setup → agent executionhost_filestiming constraint: entries are validated at config load time (before pre-scripts run), so files created by pre-scripts must useoptional: trueand dynamic path variables (${RUNNER_TEMP})docs/code.mdto reflect the four-phase pipeline with a cross-reference to the skill documentationMotivation
PR #1075 introduced a Jira-source overlay that added a
host_filesentry pointing to a file created by the Jira pre-script. The harness loader rejected the config at load time because the file didn't exist yet — the pre-script hadn't run. This caused a multi-day incident requiring 5 manual human commits to fix. The code agent had no guidance about this execution order constraint, making the mistake systematic and likely to recur.Testing
make lintpasses (skillsaw baseline regenerated for increased token count)hack/lint-agent-docspasses (doc structure valid)Closes #1102
Post-script verification
agent/1102-host-files-lifecycle-docs)48511880eaea5ef01f80b69ba4f228147611db33..HEAD)