Repository navigation
fix(sandbox): seed the agent's Git commit identity before it starts - #1252
Conversation
|
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.
e494544 to
5315ad7
Compare
|
Done — reworked as the code-side fix and force-pushed over the old commit.
The guidance is gone with it: the
|
tend-agent
left a comment
There was a problem hiding this comment.
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.
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]>
Problem
Sessions that commit hit
Author identity unknownon their firstgit 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.pyseeds the sandbox user's global Git config with the bot's noreply identity (<id>+<login>@users.noreply.github.com), next to thecore.excludesFileit 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.mdsection and the pointers to it fromreview-runs,skill-pr-workflow.mdandresolve-conflicts, thegit configlines in the integration-test recipe, and the identity setup innightly_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 pytestpasses (1153 passed; the twotest_refresh_consumers.pyfailures are the documented sandbox-DNS ones) and everypre-commithook passes. A new unit test asserts what the global config gets;proxy/test-setup-sandbox.sh, the hosted-runner job, readsuser.nameanduser.emailback 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.