Skip to content

fix(sandbox): seed the agent's Git commit identity before it starts - #1252

Merged
max-sixty merged 2 commits into
mainfrom
daily/review-runs-35013447542
Sep 16, 2026
Merged

max-sixty merged 2 commits into
mainfrom
daily/review-runs-35013447542

Conversation

@tend-agent

@tend-agent tend-agent commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Sessions that commit hit Author identity unknown on their first git commit: the disposable checkout carries no identity, and neither does a clone a session makes for itself. Every session recovered by configuring one and re-committing, and five bundled recipes plus this repo's integration-test recipe carried instructions for doing it.

Change

setup_sandbox.py seeds the sandbox user's global Git config with the bot's noreply identity (<id>+<login>@users.noreply.github.com), next to the core.excludesFile it already writes there. Both harness actions pass the login and id the rate-limit preflight already resolves from the token, and the step fails with a named error if either is missing. Global rather than checkout-local so that a clone the agent makes itself is covered too.

With the identity in place before the agent starts, the guidance goes: the pr-creation.md section and the pointers to it from review-runs, skill-pr-workflow.md and resolve-conflicts, the git config lines in the integration-test recipe, and the identity setup in nightly_workflow_update.py's ship step.

This replaces the change this PR opened with — a further pointer to that guidance from the review skill's push recipe — per the review comment on it.

Verification

uv run pytest passes (1153 passed; the two test_refresh_consumers.py failures are the documented sandbox-DNS ones) and every pre-commit hook passes. A new unit test asserts what the global config gets; proxy/test-setup-sandbox.sh, the hosted-runner job, reads user.name and user.email back as the sandbox user, which is the half that exercises the real uid boundary.

Adopters pick this up at the next release: the action ref and the bundled skills both come from the release tag, so the seeding and the guidance removal land together rather than leaving a window where neither configures an identity.

@tend-agent tend-agent added the review-runs Findings from review-runs skill label Sep 15, 2026
@max-sixty

Copy link
Copy Markdown
Owner

this is the wrong place for the change.

instead, consider adding this as code before the agent starts, and then removing any guidance about the agent needing to set it

The sandbox user's global Git config now carries the bot's noreply identity, set by setup_sandbox.py from the login and id the rate-limit preflight already resolves. Every session previously had to discover `Author identity unknown` on its first commit and configure one itself, and the guidance telling it how is now gone from the bundled skills, the integration-test recipe, and the nightly regeneration script.
@tend-agent
tend-agent force-pushed the daily/review-runs-35013447542 branch from e494544 to 5315ad7 Compare September 16, 2026 17:48
@tend-agent tend-agent changed the title skills(review): point step 9's push recipe at the git-identity step fix(sandbox): seed the agent's Git commit identity before it starts Sep 16, 2026
@tend-agent

Copy link
Copy Markdown
Collaborator Author

Done — reworked as the code-side fix and force-pushed over the old commit.

proxy/setup_sandbox.py now writes the bot's noreply identity into the sandbox user's global Git config, in the same place it already wrote core.excludesFile; both harness actions hand it the login and id the rate-limit preflight resolves from the token. Global rather than checkout-local so a clone the agent makes for itself is covered as well, and the step errors by name if either value is missing.

The guidance is gone with it: the pr-creation.md section, its pointers from review-runs, skill-pr-workflow.md and resolve-conflicts, the git config lines in the integration-test recipe, and the identity setup in nightly_workflow_update.py's ship step. Action and bundled skills both ship from the release tag, so the seeding and the removal land in the same release.

pytest and pre-commit pass locally; the hosted-runner smoke test now reads user.name/user.email back as the sandbox user, so CI checks the part unit tests can't.

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setup_sandbox.py now hard-fails without TEND_BOT_LOGIN/TEND_BOT_ID, and both only reach it if each is named twice in the harness action — once in the step's env:, once again in the env -i argv. Nothing here exercises that pairing: proxy/test-setup-sandbox.sh exports the two itself, and neither action.yaml is linted or run by this repo's CI, so dropping either line from one harness would first surface as every adopter run on that harness dying at sandbox setup on the first run after a release — the same exposure test_action_path_references_resolve already guards for action paths. I'm pushing a parity test over both actions' sandbox step asserting every env: key (bar the shell-hardening blanks) is forwarded, plus that the identity pair is present in both lists.

The sandbox setup step names each value twice — in the step's `env:` and again in the `env -i` argv — and setup_sandbox.py now refuses to start without the bot identity. Neither action.yaml is linted or run by this repo's CI, and proxy/test-setup-sandbox.sh supplies the script's environment itself, so a value added to one list alone would first fail in an adopter's job after a release.
@max-sixty
max-sixty merged commit 57a020f into main Sep 16, 2026
11 checks passed
@max-sixty
max-sixty deleted the daily/review-runs-35013447542 branch September 16, 2026 21:12
@max-sixty max-sixty mentioned this pull request Sep 17, 2026
max-sixty added a commit that referenced this pull request Sep 17, 2026
Ships #1277. bubblewrap's CVE-2026-87766 fix reached the Ubuntu archive
this afternoon, and every consumer's sessions have died at sandbox
launch since — consumers pin an immutable tag, so the fix reaches them
only through a release.

Also carried: the `tend-notifications` conflict-gate and subject-owner
fixes (#1276, #1264), the outage-enrichment skip (#1248), the sandbox
Git identity seed (#1252), and the split of tend's own maintainer calls
out of the shipped skills (#1265, #1267, #1268, #1269, #1272).

`review` will fail on this PR for the same reason the release exists:
the reviewer runs `max-sixty/tend/[email protected]`, which is the broken
pin.

> _This was written by Claude Code on behalf of max-sixty_

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review-runs Findings from review-runs skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants