Repository navigation
test: clear inherited Git config in the T3 Code backend suite - #7729
Conversation
A fleet pane already carries GIT_CONFIG core.hooksPath, and the suite's cases set the Git config they assert on themselves, so unset GIT_CONFIG_COUNT, GIT_CONFIG_KEY_0, GIT_CONFIG_VALUE_0 and GIT_CONFIG_PARAMETERS at the top as the sibling suites do.
|
The only red check, Behavior portable serial 1 (https://github.com/kunchenguid/firstmate/actions/runs/40103211272/job/120899424696), failed in tests/fm-supervision-host.test.sh ("latch: the second engine error did not hand the wake back") after a ~25.6 min shard - the same slow-shard timing flake seen on #7518, unrelated to this change, which only adds an unset line to tests/fm-backend-t3code.test.sh. Could a maintainer rerun that job? Contributors can't rerun it. Thanks! |
|
Speaking as Kun's firstmate: thanks @arthurcruzd for picking up the small follow-up from #7518 so quickly. Dropping the inherited I read the diff at head CI: every check is green except Contract-class: restore. Test isolation only, and the unconfigured product path is unchanged. VISION: aligns (field incidents become regression coverage, and the change is scripted with no new surface). Next step: if the re-run is green, this can be merged without anything more from you. This is waiting on CI, not on you. |
|
Speaking as Kun's firstmate: this is merged. Thank you @arthurcruzd — really appreciate you taking the time on this. The T3 suite now drops the inherited |
Intent
Ok pra PRs. - one-task upstream consent for the small follow-up PR to github.com/kunchenguid/firstmate: pooled-home cleanup also removes the config/t3code-token symlink and only the owned settings entries, plus the small test env cleanup. Open it only after PR 7518 merges.
Context needed to read that ask. #7518 (the T3 Code backend over Orchestrator V2 /mcp) merged on 2026-10-24. During its review the maintainer welcomed two optional follow-ups (#7518 (comment)): docs/t3code-backend.md's manual cleanup told operators to remove the whole .claude/settings.local.json and did not mention removing the config/t3code-token symlink before returning a pooled home; and tests/fm-backend-t3code.test.sh should unset GIT_CONFIG_COUNT, GIT_CONFIG_KEY_0, GIT_CONFIG_VALUE_0 and GIT_CONFIG_PARAMETERS as its sibling suites do. The merged docs already say to remove only the keys FM_T3CODE_ENV_KEYS lists and the config/t3code-token symlink for a secondmate home.
What Changed
tests/fm-backend-t3code.test.shnow unsetsGIT_CONFIG_COUNT,GIT_CONFIG_KEY_0,GIT_CONFIG_VALUE_0andGIT_CONFIG_PARAMETERSbefore it sourcestests/lib.shor runs any git command, the same waytests/fm-git-push-guard.test.shalready does.core.hooksPathoverride inherited from a fleet pane can't leak into cases that set and check their own Git config entries. No product code or docs change.🤖 Generated with Claude Code
Risk Assessment
✅ Low: The only change is a four-line test-isolation unset at the top of tests/fm-backend-t3code.test.sh. It matches the sibling suites (fm-git-push-guard, fm-git-strip-ai-trailers). No case in the suite relies on inherited GIT_CONFIG_* values: the inherited-config cases at lines 1937 and 1948 set them per command. The pooled-home docs cleanup the intent asks for is already in docs/t3code-backend.md:254-256 from the merged PR 7518, so leaving the docs untouched is not a gap.
Testing
I built a throwaway fleet-pane environment. A scratch repo got hooks frombin/fm-git-strip-ai-trailers.sh install, plus that script'senv-fileexport (GIT_CONFIG_COUNT=1, KEY_0=core.hooksPath, VALUE_0=<hooks dir>). I sourced the export and ran the whole fixedtests/fm-backend-t3code.test.sh. It exited 0 in 225s with 89 cases passing and none failing. The pooled secondmate teardown case was among them, and it showed the token link and only Firstmate's settings keys being removed before the slot is returned. That case uses the suite's fake T3 server and a recording treehouse stub, because no real T3 Code is installed and a realtreehouse returnwould touch the operator's pool. These are test-suite runs, not live product runs, so the scenarios are recorded as untested. The change is test-only, so there is no runtime product surface to drive. I read the docs cleanup steps; they already match the intent and this branch doesn't change them. I prepared, but did not run, a comparison of the old and new suites under hostile inherited config (hooks that always fail, and GIT_CONFIG_PARAMETERS). The old-suite copy and the scratch directory are deleted and the worktree is clean.Evidence: Fixed T3 Code suite run from a fleet-pane shell with inherited core.hooksPath (exit 0, 89 ok)
Source: Fixed T3 Code suite run from a fleet-pane shell with inherited core.hooksPath (exit 0, 89 ok)
# inherited: GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=core.hooksPath GIT_CONFIG_VALUE_0=/private/tmp/fm-t3gitcfg.*/pane-hooks ... ok - fm-teardown.sh backend=t3code pooled secondmate: the slot returns only after the provider ended, without the T3 environment the spawn wrote ... # exit=0 elapsed=225sPipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
t3CLI is installed on this machine, and a realtreehouse returnwould change the operator's pool. A live run needs a disposable T3 Code instance with an Orchestrator V2 /mcp credential.; Adversarial: hostile inherited Git config (core.hooksPath hooks that exit 1, or GIT_CONFIG_PARAMETERS commit.gpgsign=true) breaks the old suite but not the fixed one: Not run in this step; there was no technical blocker. The fixed suite already passes with real inherited fleet config, and the new line matches the sibling suites' unset line exactly, so skipping this doesn't cast doubt on the intent. It would only show how the old suite failed.; The manual cleanup docs tell operators to remove only the owned settings keys and the config/t3code-token link before returning a pooled home: Docs text has no runtime surface. It was already merged in feat(bin): add an explicit-only T3 Code runtime backend #7518, this branch doesn't change it, and I checked it by reading only.bin/fm-git-strip-ai-trailers.sh install <scratch>/pane-hooks <scratch>/pane-wtandenv-fileto make a real fleet-pane core.hooksPath export in a disposable /tmp/fm-t3gitcfg.* directory. pane-env.sh && bash tests/fm-backend-t3code.test.shat commit 87709165 with GIT_CONFIG core.hooksPath inherited: exit 0, 89 ok, 0 failed, 225stest_pooled_t3_secondmate_home_returned_only_after_provider_exits, observed passing in that rungit diff d96bff00 87709165: the only change is the unset line in tests/fm-backend-t3code.test.shRead docs/t3code-backend.md:251-258 to confirm the merged pooled-home cleanup wording✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.