base-commit pinning: baseCommit dispatch field split from ref, branch-o… - #1007
Merged
Conversation
…m ref (warren-aaf7) Split runs.ref's two meanings: ref stays branch-shaped (workspace base for branch dispatches AND the reap PR base — byte-identical semantics for every existing ref-dispatch), while a new optional baseCommit (exact 40-hex SHA) pins the workspace cut point only, never the PR base. - runs.base_commit column, migrations both dialects (0051 sqlite / 0046 pg) - spawnRun: baseRef = baseCommit ?? continuation/ref resolution; baseCommit frozen on the row and echoed by the projections - HTTP boundary validation (src/runs/base-commit.ts): ref must pass isValidBranchRef; a 40-hex ref is a 400 pointing at baseCommit; baseCommit must be exactly 40-hex - pushCloneDeltasToOrigin skips a SHA ref with a logged reason instead of burning a clone_apply_push failure (legacy SHA-ref rows) - infra-lost retry carries baseCommit forward with ref - SDK CreateRunInput/DispatchRunInput/RunRow, UI types, warren run --base-commit; goldens + cli-reference regenerated
jayminwest
enabled auto-merge (squash)
August 19, 2026 21:29
…t after merge union
jayminwest
added a commit
that referenced
this pull request
Aug 25, 2026
* chore(ci): report what overshot check:size on the PR (warren-8746, #1032) The file-size budgets only ratchet down on purpose, so there is no honest auto-heal for this gate the way bundle-size-autoheal re-baselines a measured bundle, and editing a contributor's source on their branch is not a bounded action. What was missing is the diagnosis. When a file sits at its ceiling and two independently green PRs each add lines to it, the update-branch merge pushes the union, CI re-runs on it, and check:size fails on a branch where both sides passed alone. Each of #1007, #1009 and #1011 needed a human to work out which file and by how much. size-overshoot-report.yml re-runs the gate on the head branch after a failed CI run. If the gate passes, the failure was something else and the job says so and stops. If it fails, it posts one comment naming each overshoot as `path: lines/budget (+N)`, edited in place on a re-run rather than appended, and exits 0 so it never masks the real failure. check-file-sizes.ts gains --headroom N, a non-failing mode that reports the files with N lines of slack or less. The number worth watching is the slack, not the pass: twelve files have zero headroom at HEAD and 32 sit within ten lines of a ceiling, so the comment carries that list beside the overshoot. The workflow skeleton, the workflow_run trigger, the job-level guard, the App-token mint and the pr-gate step are cloned from bundle-size-autoheal.yml. It never pushes, so it asks for contents: read rather than write. * chore(ci): build the size report on the branch, post it from the artifact The privileged workflow_run job checked out the head branch with the App installation token and then ran bun install and check:size from it. Warren pushes agent branches directly, so that handed branch-controlled code a token with pull_requests write, and checkout left it in .git/config. CI now builds the report on the branch, where no credential is in reach, and uploads it as the size-overshoot-report artifact. The privileged job downloads that artifact and posts the comment. It has no checkout, no bun and no step that runs anything the branch wrote. The PR number still comes from the API rather than the artifact, and the report text is fenced with backticks neutralised and a size cap, since the branch wrote it. No artifact means check:size was not the failure, and the job says so. * fix(ci): encode the PR branch query --------- Co-authored-by: Jaymin West <jayminwest@gmail.com>
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
feat(runs): base-commit pinning — baseCommit dispatch field split from ref (warren-aaf7)
Agent notes
Split runs.ref's two meanings: ref stays branch-shaped (workspace base for
branch dispatches AND the reap PR base — byte-identical semantics for every
existing ref-dispatch), while a new optional baseCommit (exact 40-hex SHA)
pins the workspace cut point only, never the PR base.
frozen on the row and echoed by the projections
isValidBranchRef; a 40-hex ref is a 400 pointing at baseCommit; baseCommit
must be exactly 40-hex
burning a clone_apply_push failure (legacy SHA-ref rows)
--base-commit; goldens + cli-reference regenerated
Run
run_9qf0tejnzy6aSeeds
Commits (1)
Files changed
Prompt
Show prompt
🤖 Opened by warren run
run_9qf0tejnzy6a