Repository navigation
Conversation
Description:
Stage 3 commits execution notes (executions/E-*.md) that fail the repository Prettier check, so the CI Markdown hygiene job is red on the flow's own bookkeeping file. The file is outside the plan touch set, the Stage 4 resolver records no outcome for the hygiene finding, and the review loop repeats without consensus. Plans and calibration reports are already formatted before they are committed; execution notes are the remaining generated artifact that is not.
Goal:
Make every execution notes file reach the execution branch already formatted, and let the Stage 4 resolver repair a flow's own execution notes instead of looping on them. Root cause (measured): the executor prompt tells the agent to commit after each plan step, so the agent commits executions/<execution id>.md itself; apps/sandbox-executor/src/sandbox_executor/entrypoint/changed_markdown.py lists Markdown only from 'git status --porcelain', so CheckWorkSteps._converge_markdown in apps/sandbox-executor/src/sandbox_executor/entrypoint/executor/outcome.py never sees a notes file that is already committed and formats nothing; in addition that step uses the pinned Prettier of sandbox_executor.formatting, while CI runs the repository Prettier ('npx prettier --check'), the difference already recorded in apps/sandbox-executor/src/sandbox_executor/calibration_format.py. (1) Stage 3: before the engine's execution commit, the Markdown set that is formatted is the union of the working-tree changes (today's behaviour) and the Markdown files committed on the execution branch since the plan tip (self.plan_tip), deleted files excluded; the flow's own execution notes (self.notes_rel) are always in that set when the file exists. The execution notes are formatted in this order: python code fences with the existing format_plan_artifact of apps/sandbox-executor/src/sandbox_executor/plan_artifact_format.py (it accepts any Markdown file inside the repository), then the repository Prettier with the same argv family the calibration report uses ('npx --yes prettier --write' then '--check', up to three passes), implemented in apps/sandbox-executor/src/sandbox_executor/execution_notes_format.py (new) so that outcome.py only calls it; the re-formatted files are part of the engine's execution commit (the existing stage_changes and commit_steps path stages them, no new commit type is needed). A formatter that is missing or fails logs one warning naming the file and never fails the execution (today's behaviour for Prettier). sandbox_executor/formatting.py, entrypoint/executor/run.py and entrypoint/executor/pre_push.py are not changed. (2) Stage 4 resolver: apps/sandbox-executor/src/sandbox_executor/execution_notes_format.py (new) also provides the own-notes test and formatter for a flow branch (the notes path is derived from the execution branch name I-.../P-.../E-<id>/_ as executions/E-<id>.md, and nothing else under executions/ is ever touched), and _commit_resolution in apps/sandbox-executor/src/sandbox_executor/entrypoint/review_loop.py calls it next to the existing format_own_plan_artifacts call. It must run before the 'nothing applied or no worktree change' early return, so that a branch whose only defect is its own unformatted execution notes gets a resolver commit holding just that formatting change (the existing commit message already falls back to the iteration id when no finding was applied) after the unchanged pre-push verification; the touch-set refusal keeps ignoring executions/ paths as it does today and still refuses any code path outside the touch set. Keep review_loop.py within its existing 913-line module budget by keeping the new logic in the new module, never modify holon-config/hygiene/module_budgets.json, and keep every other module within the default 350 lines. Update the 'Resolver pre-push verification' section of docs/review_consensus.md to say that the flow's own execution notes are formatted there. Tests: update the two pinned tests in apps/sandbox-executor/tests/test_executor_characterisation.py that record the Stage 3 command sequence, update apps/sandbox-executor/tests/test_executor_outcome.py, apps/sandbox-executor/tests/test_executor_package.py, apps/sandbox-executor/tests/test_plan_artifact_format.py, apps/sandbox-executor/tests/test_review_loop_plan_artifacts.py and apps/sandbox-executor/tests/flow/review/test_resolver_touch_set.py only where the new behaviour requires it, and add the new tests in apps/sandbox-executor/tests/test_execution_notes_format.py (new), apps/sandbox-executor/tests/test_executor_committed_notes_format.py (new) and apps/sandbox-executor/tests/test_review_loop_execution_notes.py (new); tests/test_review_loop.py is 2,577 lines and tests/test_planner.py is 934 lines, so no test is added to either. Out of this slice, recorded as follow-up work: the Stage 4 loop halting after two consecutive iterations with zero resolver progress (host-side review loop), and any change to the pinned Prettier used for Stage 2 plan Markdown. Code is self-explaining: no docstrings and no comments except '# why:' comments that record a reason the code cannot show.
Generated by Holon Intent Agent at 2026-12-01T12:50:25Z
…notes-format-before-commit/P-1796129440-CLA-CO5.5/_
Action-Origin: pr_review Review-Iteration: 1 Review-Finding-Ids: R2-F1 Review-Severity: nit
Action-Origin: pr_review Review-Iteration: 1
thomashan
commented
Dec 1, 2026
thomashan
left a comment
Collaborator
Author
There was a problem hiding this comment.
✅ Ensemble Consensus Review — APPROVED (3/3)
Reviewed exec-notes-format-before-commit at e577b68d against main: 0 critical, 0 important and 0 nit findings; CI passing; mergeability UNMEASURED.
Role reviews:
| Role (activated) | Verdict | Review |
|---|---|---|
| Engineering | PASS | The duplicated path-safety and byte-read helpers are now shared from plan_artifact_format; the shared versions behave the same as the removed copies and all callers were... |
| Testing | PASS | Ran the execution-notes, plan-artifact and resolver-notes test modules: 81 tests passed after the helpers were made public. |
Verified:
- R2-F1 is fixed: execution_notes_format imports is_markdown_file_inside and artifact_bytes instead of keeping its own copies —
apps/sandbox-executor/src/sandbox_executor/execution_notes_format.py - No reference to the removed private helper names remains —
apps/sandbox-executor/src/sandbox_executor/plan_artifact_format.py - Notes formatting and plan-artifact formatting tests pass —
apps/sandbox-executor/tests/test_execution_notes_format.py - Execution notes reuse the shared Markdown path-safety and byte-read helpers —
apps/sandbox-executor/src/sandbox_executor/execution_notes_format.py - R2-F1 fixed: execution notes reuse plan_artifact_format's is_markdown_file_inside and artifact_bytes —
apps/sandbox-executor/src/sandbox_executor/execution_notes_format.py - Shared helpers keep their behaviour after being made public —
apps/sandbox-executor/tests/test_plan_artifact_format.py - Notes formatting still works through the shared helpers —
apps/sandbox-executor/tests/test_execution_notes_format.py
Checks: Mergeability UNMEASURED · CI 16/16 passed, 0 failing, 0 pending (source: ci_head)
Covers head e577b68; change fingerprint pf2:0d5886bcafc4; CI at that commit: 16 of 16 checks passed.
🗳️ Ensemble Review Breakdown
- Reviewer 1 (
claude-agent / claude-opus-5-5):APPROVED(critical: 0, important: 0, nit: 0) - Reviewer 2 (
claude-agent / claude-opus-5-5):APPROVED(critical: 0, important: 0, nit: 0) - Reviewer 3 (
claude-agent / claude-opus-5-5):APPROVED(critical: 0, important: 0, nit: 0) - Ensemble Consensus Verdict:
APPROVED
Reviewed by claude-agent (3-Agent Ensemble) · Model claude-opus-5-5
Stage 5 calibration will be added to this PR before merge. Merging remains with the human maintainer.
Action-Origin: pr_review Review-Iteration: 2
thomashan
deleted the
I-1796129417-exec-notes-format-before-commit/P-1796129440-CLA-CO5.5/E-1796129676-CLA-CO5.5/_
branch
December 2, 2026 22:46
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
Stage 3 commits execution notes (executions/E-*.md) that fail the repository Prettier check, so the CI Markdown hygiene job is red on the flow's own bookkeeping file. The file is outside the plan touch set, the Stage 4 resolver records no outcome for the hygiene finding, and the review loop repeats without consensus. Plans and calibration reports are already formatted before they are committed; execution notes are the remaining generated artifact that is not.
Goal:
Make every execution notes file reach the execution branch already formatted, and let the Stage 4 resolver repair a flow's own execution notes instead of looping on them. Root cause (measured): the executor prompt tells the agent to commit after each plan step, so the agent commits executions/.md itself; apps/sandbox-executor/src/sandbox_executor/entrypoint/changed_markdown.py lists Markdown only from 'git status --porcelain', so CheckWorkSteps.converge_markdown in apps/sandbox-executor/src/sandbox_executor/entrypoint/executor/outcome.py never sees a notes file that is already committed and formats nothing; in addition that step uses the pinned Prettier of sandbox_executor.formatting, while CI runs the repository Prettier ('npx prettier --check'), the difference already recorded in apps/sandbox-executor/src/sandbox_executor/calibration_format.py. (1) Stage 3: before the engine's execution commit, the Markdown set that is formatted is the union of the working-tree changes (today's behaviour) and the Markdown files committed on the execution branch since the plan tip (self.plan_tip), deleted files excluded; the flow's own execution notes (self.notes_rel) are always in that set when the file exists. The execution notes are formatted in this order: python code fences with the existing format_plan_artifact of apps/sandbox-executor/src/sandbox_executor/plan_artifact_format.py (it accepts any Markdown file inside the repository), then the repository Prettier with the same argv family the calibration report uses ('npx --yes prettier --write' then '--check', up to three passes), implemented in apps/sandbox-executor/src/sandbox_executor/execution_notes_format.py (new) so that outcome.py only calls it; the re-formatted files are part of the engine's execution commit (the existing stage_changes and commit_steps path stages them, no new commit type is needed). A formatter that is missing or fails logs one warning naming the file and never fails the execution (today's behaviour for Prettier). sandbox_executor/formatting.py, entrypoint/executor/run.py and entrypoint/executor/pre_push.py are not changed. (2) Stage 4 resolver: apps/sandbox-executor/src/sandbox_executor/execution_notes_format.py (new) also provides the own-notes test and formatter for a flow branch (the notes path is derived from the execution branch name I-.../P-.../E-/ as executions/E-.md, and nothing else under executions/ is ever touched), and _commit_resolution in apps/sandbox-executor/src/sandbox_executor/entrypoint/review_loop.py calls it next to the existing format_own_plan_artifacts call. It must run before the 'nothing applied or no worktree change' early return, so that a branch whose only defect is its own unformatted execution notes gets a resolver commit holding just that formatting change (the existing commit message already falls back to the iteration id when no finding was applied) after the unchanged pre-push verification; the touch-set refusal keeps ignoring executions/ paths as it does today and still refuses any code path outside the touch set. Keep review_loop.py within its existing 913-line module budget by keeping the new logic in the new module, never modify holon-config/hygiene/module_budgets.json, and keep every other module within the default 350 lines. Update the 'Resolver pre-push verification' section of docs/review_consensus.md to say that the flow's own execution notes are formatted there. Tests: update the two pinned tests in apps/sandbox-executor/tests/test_executor_characterisation.py that record the Stage 3 command sequence, update apps/sandbox-executor/tests/test_executor_outcome.py, apps/sandbox-executor/tests/test_executor_package.py, apps/sandbox-executor/tests/test_plan_artifact_format.py, apps/sandbox-executor/tests/test_review_loop_plan_artifacts.py and apps/sandbox-executor/tests/flow/review/test_resolver_touch_set.py only where the new behaviour requires it, and add the new tests in apps/sandbox-executor/tests/test_execution_notes_format.py (new), apps/sandbox-executor/tests/test_executor_committed_notes_format.py (new) and apps/sandbox-executor/tests/test_review_loop_execution_notes.py (new); tests/test_review_loop.py is 2,577 lines and tests/test_planner.py is 934 lines, so no test is added to either. Out of this slice, recorded as follow-up work: the Stage 4 loop halting after two consecutive iterations with zero resolver progress (host-side review loop), and any change to the pinned Prettier used for Stage 2 plan Markdown. Code is self-explaining: no docstrings and no comments except '# why:' comments that record a reason the code cannot show.
Key Changes
References
None
Plan & Validation Metadata
P-1796129440-CLA-CO5.549.30claude-agentclaude-opus-5-5