Canonical merge of #874 - #875
Merged
Merged
Conversation
The prompt embedded the transcript whole, so the prompt was the session. On the reporter's machine a 67,981,436-byte transcript produced a 67,468,122-byte prompt — 99.3% of the file, and larger than any model can read, so the capture pipeline could not be completed and no record was ever written. The pipeline itself was fine: `tail -n 400` on the same transcript gave 537,250 bytes and the same command worked. That made it worse than a size. Prompt-only mode reports `outcome: "empty"`, `staged: false`, exit 0, so an operator who tried capture once on a real session got a prompt they could not use and no statement that anything was wrong. In the repository where it was measured, `stale` reported 1 record in 1000 commits with unattended capture already enabled — permission was never the obstacle. The prompt now carries the end of the transcript within a byte budget, 256 KiB by default and `COMMITLORE_TRANSCRIPT_BUDGET_BYTES` to change it. The end rather than the beginning: a decision is taken near the end of the session that implements it, and the diff being captured is that end. Three things the bound does not do. It does not renumber: the window's lines keep the numbers they have in the whole transcript, because verification reads the whole transcript and a locator renumbered from 1 would name a different line of the file it is checked against. It does not reach the hash: `source_hashes` and every quote check are still over the whole transcript, so a quote from outside the window still verifies and a caller passing the session it actually had is never told the transcript was substituted. And it does not stay quiet — the prompt says which lines it is showing and how many were left out, and `transcript_window` says the same to `capture --json` and to `commitlore_prepare_capture`. A bounded prompt that did not say so would be the old silence in a smaller package. One line of a JSONL transcript can hold an entire tool result and outrun the budget by itself. That line is shown from its end rather than dropped, and the window says so, because a window of no lines is worse than a window of one partial line. The byte slice never leaves a split codepoint at the front: a replacement character inside a quotable line is a character nobody can copy back. Where the boundary should be is not claimed. 256 KiB is comfortably readable by current models and carries far more than the ~537 KB slice measured to work; the reporter said they had not measured where the useful boundary is, and neither has this. Closes #873 Claude-Session: https://claude.ai/code/session_01USc9G3aJ1s8pnhWy5K5hLr Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Brings 1.2.2 (#870) under this change, so the release bump below sits on the version it follows.
Version fields, install pins and the changelog entry for 1.2.3. The release carries one fix: `capture` embedded the whole transcript in its prompt, so on a long session the prompt was larger than any model can read and no record was ever written (#873). The failure was silent — prompt-only mode reports outcome "empty", staged false, exit 0. The install pins move; the field-report paragraph in each README keeps saying v1.2.1, because that is the version the run it describes was made on. `dist/` is deliberately not in this branch. `canonical-merge.yml` rebuilds the bundle from the merged tree and refuses a pull request that touches it, so the committed bundle matches the source it lands with. Claude-Session: https://claude.ai/code/session_01USc9G3aJ1s8pnhWy5K5hLr Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`build:canonical` on the merged tree, so the commit that lands matches the source it lands with. The pull request carried source only, which is what a contributor on a host that cannot run a linux/amd64 Docker build can produce (#720). Limit: this proves the bundle matches this tree; whether this tree is what a reviewer wants is what the pull request is for Blast: system Undo: easy Certainty: firm Record-Id: r-canonmerge874 Provenance: authored Verified: artifact:verify passed against the regenerated manifest in the same job, before any credential was available to it CommitLore-Version: 2.0.0
CommitLore — record lintTrailers: clean — 5 commits in Active constraints for the paths this PR touchesLimits (391)
Truncated: 832 lines omitted — the comment hit GitHub's 65000 character limit. Trailer violations fail this check. Active constraints are informational — they are what the repository already decided, not a verdict on this PR. |
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.
The commit that will land for #874:
mainplus that source plus a canonical rebuild, built together so all eleven required contexts run on the tree that merges rather than on one that resembles it.#874 carries source only, which is what a contributor on a host that cannot run a
linux/amd64Docker build can produce (#720). Nothing was rebuilt by hand.Merge this with a merge commit, not a squash. This branch merged #874 with
--no-ff, so its head commit is an ancestor here: a merge commit lands that commit onmain, and GitHub then records #874 as merged because its head is reachable -- which is what T-1502 asks for. A squash lands new bytes instead, and #874 stays open with nothing to point at.This body deliberately carries no closing keyword. GitHub binds one only to the number straight after it, and a pull request closed by keyword is recorded closed rather than merged -- the opposite of the line above. Reachability does the closing here.
Opened by
canonical-merge.ymlfor #719.