Repository navigation
Merged
Conversation
#567: pipeline.haiku._choose_summarizer_provider() now warns before falling back to `claude` for a recognised Antigravity transcript, the same as it already does for a vanished Codex transcript -- teaching sniff_envelope() the Antigravity shape (#563) had silently moved this case out of the only arm that used to warn, with no discussion of the tradeoff. Confirmed by evidence in this repo (no antigravity-native summarizer provider exists, and every other "recognised non-default host, still falls back to claude" arm in this function already warns) that silent routing was an accidental side effect, not a decision -- so the fix restores the warning rather than documenting the silence as intended. docs/install-antigravity.md and docs/configuration.md updated to describe it. #568: scripts/agy-stop-hook.sh, scripts/agy-session-start-hook.sh and scripts/agy-pre-invocation-hook.sh each rendered a malformed stdin payload identically to a genuinely empty-but-valid one. Each script now distinguishes the two and logs a warning to stderr on the malformed arm -- safe, since agy only ever parses these hooks' stdout as protojson and stdout already goes nowhere on this path. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Bv6BGZD2EdZ9EuJ7tPDTb7
Both self-review spawns (Explore and oss:auditor) independently found the same real defect in the first pass of the #568 fix: an unguarded `mktemp` call, under `set -e`, in all three agy-*-hook.sh scripts -- turning an unwritable/full TMPDIR into an interpreter-level script abort instead of these scripts' own documented "0 Always" exit contract. Guarded following the pattern already established in save-session.sh's own `mktemp ... || { ...; exit 1; }`. The reviewer additionally caught that agy-stop-hook.sh's warning message was built from the wrong variable: a plain JSON-syntax error never writes to python's stderr (only to the new 4th stdout line), so the operator-facing message always fell back to the generic "python3 unavailable" text even when python ran fine and had already computed the real reason. Fixed by routing agy-stop-hook.sh's message through that same stdout line instead of a separate mktemp-captured stderr file, which also removes its mktemp dependency (and thus the first finding) entirely for that script. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Bv6BGZD2EdZ9EuJ7tPDTb7
CI (job 101342578203) failed tests/test_windows_skip_triage_497.py on windows-latest for 3.10/3.11/3.12: the meta-guard requires every module that blanket-skips on win32 to carry a triage row in docs/windows-skip-triage.md, and tests/test_agy_hooks_malformed_payload_568.py (added in 2e9534a) had none. Added a row using tests/test_agy_hooks_563.py's identical skip reason ("bash hook subprocess + POSIX semantics -- not portable to Windows runners") as the template, since it hit this same guard earlier today and its own entry already follows this form -- same verdict (unclear), same basis (a templated reason that bundles the bash-subprocess dependency with an unspecified "POSIX semantics/layout" claim). Reproduced locally first: `pytest tests/test_windows_skip_triage_497.py` failed with the identical assertion CI reported before this change, and passes after it. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Bv6BGZD2EdZ9EuJ7tPDTb7
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.
Both issues came out of the 0.28.0 release audit (round 1, dispatch token e1a766657500), both on the Antigravity (agy) capture path added by #566.
#567 -- silent routing to the claude summarizer
Closes #567
pipeline/haiku.py's_choose_summarizer_provider()fell silently toreturn "claude"for a recognised Antigravity transcript, with no warning that a different vendor's session was being billed to Anthropic -- the exact shape #460/#477 already warn about elsewhere in the same function (a vanished Codex transcript, and a genuinely unrecognised envelope shape, both already warn before falling back). Teachingsniff_envelope()the Antigravity shape (#563) had moved this case out of the only arm that used to warn, apparently as a side effect rather than a decision.Decision made in this PR, with evidence: there is no antigravity-native summarizer (
_SUMMARIZER_PROVIDERSis still{claude, codex, auto}), soclaudestays the correct routing target -- the bug was the missing receipt, not the routing itself. Fixed by adding a warning before the fallback, matching the two existing sibling arms. Docs updated indocs/install-antigravity.mdanddocs/configuration.md.#568 -- malformed hook payload indistinguishable from an empty one
Closes #568
scripts/agy-stop-hook.sh,scripts/agy-session-start-hook.shandscripts/agy-pre-invocation-hook.sheach rendered a malformed stdin payload (bad JSON, or nopython3at all) identically to a genuinely empty-but-valid{}payload -- the stop hook then exited 0 having captured nothing, with no receipt anywhere. Each script now distinguishes the two and logs a warning to stderr only on the malformed arm, staying silent for the ordinary empty case -- safe, sinceagyonly ever parses these hooks' stdout as protojson and stdout already goes nowhere on this path.Self-review findings
Both spawned reviewers (Explore and oss:auditor) independently found the same real defect in the first draft: an unguarded
mktempcall underset -ein all three scripts, which could abort the whole hook (violating its own documented "exit 0 always" contract) if TMPDIR were unwritable or full. Fixed by guarding themktempcall and, inagy-stop-hook.sh, removing themktempdependency entirely by routing the diagnostic message through the same stdout channel the parse-status field already uses. The reviewer also caught thatagy-stop-hook.sh's warning message was built from the wrong variable (python's stderr, which a plain JSON-syntax error never writes to) -- also fixed.Not fixed, reported here instead (below the bar for this PR):
agy-stop-hook.sh's line-based field parsing (pre-existing, not introduced by this diff) silently misroutesconversationId/transcriptPath/workspacePathsif either JSON string contains a literal embedded newline -- confirmed identical behavior on the pre-#568 code viagit show HEAD~1. Reachable in principle (a host emitting such a value), but redesigning the field-passing scheme (e.g. NUL-delimited output, or one python call per field) is a larger, separate change than this issue's own scope, and the underlying fragility already existed before this diff touched the file. report-for-filing.Self-review anchor for the tree-mutation check: both spawns were explicitly told not to edit or mutate the tree;
git reflogandgit status --shortafter both returned show only this branch's own two commits and a clean working tree.🤖 Generated with Claude Code
https://claude.ai/code/session_01Bv6BGZD2EdZ9EuJ7tPDTb7
[AI-generated]