oliver-zehentleitner / maity

cli tests: _isolate drops the session's GIT_COMMON_DIR and GIT_CONFIG_*

Sign in to report

tsk-btvmyja4ds9j Done An agent

From 6j4u's design note on tsk-0byeaemhpfx3 (nte-rj3cwn9325gq). In a placed session the CLI test fixtures write to .git/config. The likely cause is the session's GIT_COMMON_DIR and GIT_CONFIG_* variables reaching the tests, so test repositories write into the real clone's config, which the sandbox rightly refuses. This comes from reading the code; it has not been run yet.

To do:

  • cli/tests/conftest.py _isolate: delenv GIT_COMMON_DIR, GIT_DIR, GIT_WORK_TREE, GIT_INDEX_FILE and every GIT_CONFIG_* (count, key/value pairs, GLOBAL, SYSTEM, NOSYSTEM as appropriate). Say which ones and why.
  • Add a test that fails when they leak.
  • Run make -C cli test in a placement before and after, and post the counts.
  • Do not widen any sandbox allowance.

Earlier: tsk-e00g3ydhq2xc (cancelled as a duplicate of tsk-kshmb8vc92rr). Ask lotse for a go before pushing.