Skip to content

captain-hook: ♻️ Bound and warm prepared transcript evidence - #195

Merged
yasyf merged 1 commit into
mainfrom
perf/prepared-graph-evidence
Sep 26, 2026
Merged

yasyf merged 1 commit into
mainfrom
perf/prepared-graph-evidence

Conversation

@yasyf

@yasyf yasyf commented Sep 26, 2026 •

Copy link
Copy Markdown
Owner

Context

A long-running Claude session has 929 registered Codex transcripts totaling about 865 million bytes. Deep Stop conditions previously sent attachment lists on repeated queries, then reread and lowered the same source material. A cold hook could wait until Claude’s 30-second timeout or fail schema validation above 256 attachments.

Summary

Prepare one event-owned graph handle and answer deep predicates from native, revision-keyed facts. Root acquisition, classifier preparation, and graph queries share a 750 ms foreground deadline and a 1,048,576-byte read cap; incomplete evidence fails open without a traceback. Cleanup of cursors, graphs, and leases runs after the hook reply. One persistent-worker queue coalesces root and registered-source warming, runs 8,388,608-byte native steps with pacing after physical reads, and gives warming separate host and owner admission from foreground hooks. capt-hook transcripts warm --session <id> --root <project> prewarms and verifies both root and registered-source cache hits.

Motivation

The graph handle removes path-bearing deep queries from the Python API. Native preparation and append-aware cached facts prevent repeated whole-file reads. The foreground bound preserves terminal responsiveness while a single paced warmer progresses through large roots and registries without recreating storage saturation.

Details

Generated protocol schemas match cc-transcript v14.28.3 at its published tag, and the lockfile pins its verified PyPI wheel hashes. Tests cover cold root and 923-source fail-open, deferred cleanup, foreground latency during warming, mixed Codex append cycles, cache reuse under the same authority, restricted-authority isolation, queue saturation, per-source progress, worker admission, and operator output. The operator reports classifier_unavailable for caller-defined Python classifiers, whose callback cannot be reconstructed in a parentless native warmer; the affected redhorse owner has no hooks/conf.py and uses built-in classification.

@yasyf yasyf changed the title captain-hook: ♻️ Prepare transcript graph evidence once per event captain-hook: ♻️ Bound and warm prepared transcript evidence Sep 26, 2026
@yasyf
yasyf force-pushed the perf/prepared-graph-evidence branch 3 times, most recently from 0b6de8a to dd1811f Compare September 26, 2026 05:46
@socket-security

socket-security Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​cc-transcript@​14.28.1 ⏵ 14.28.399 +110010010090

View full report

@yasyf
yasyf force-pushed the perf/prepared-graph-evidence branch 4 times, most recently from 5b53b06 to 643db30 Compare September 26, 2026 06:28
Context: Deep hook conditions traverse and reread large registered transcript sets.

Summary: Use an event-owned prepared graph, cumulative foreground budgets, and paced root and registry warming.

Motivation: Keep terminal hooks responsive without losing independent transcript evidence.

Details: Pin cc-transcript v14.28.3, route warming and cleanup through bounded admission, add operator prewarming, refresh fresh-release wheel smoke metadata, document the release, and generate protocol schemas.
@yasyf
yasyf force-pushed the perf/prepared-graph-evidence branch from 643db30 to e3a3b43 Compare September 26, 2026 06:34
@yasyf
yasyf marked this pull request as ready for review September 26, 2026 06:37
@yasyf
yasyf merged commit 9daa7b5 into main Sep 26, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant