Repository navigation
fix(trial): preserve patch output bytes - #383
mayankdhingra02 wants to merge 4 commits into
Conversation
|
Paused for the day (17 Nov, 07:5x GMT). Stopped at head 9664c26 after updating the branch from main: all checks green, merge state clean. Next: an Opus review at this exact head, then merge if approved. |
BenSheridanEdwards
left a comment
There was a problem hiding this comment.
Reviewed at 9664c26. The fix is correct and well scoped: only writePatch reads Git's output untrimmed, while the other git() callers keep trimmed output. The three new cases pass locally and they apply the patch for real, not just compare bytes. The compare/result-facts parser is unaffected (compare tests pass).
The branch is one commit behind main, so it needs updating before merge.
The shared exec helper can still corrupt multibyte characters at stdout chunk boundaries, which predates this PR. That's tracked in #388.
Why does this feature exist?
A trial patch can become corrupt when Git output is trimmed, losing a final blank context line. Fixes #380.
What changed?
Keep patch stdout untrimmed while retaining trimming for ordinary Git queries. Preserve the three real patch-application regressions. Let the fake agent make its wip commit through the fixture's normal hooks, with every result-commit assertion retained.
Behavioural Proof (with video and screenshots)
Verification Summary
pnpm exec jest --selectProjects tooling --testPathPattern tooling/trial/run-trial.test.ts --runInBand --testNamePattern '^runTrial makes the one result commit with the hooks on, whatever the agent committed$';pnpm install --frozen-lockfile;pnpm lint:anti-slop;pnpm verify;pnpm e2e. Full verification ran through the shared heavy-suite limiter in the normal pre-push hook.pnpm verifypnpm e2e.agents/project/ARCHITECTURE.mdandCONVENTIONS.md.PRD Behaviours to Review
PR Proof Law
.agents/project/PR_QUALITY.mdand.agents/skills/pr-quality-contract/SKILL.md; thePR qualitycheck verifies the proof format.