Skip to content

Prevent Git maintenance from racing source-history fixture cleanup - #4984

Merged
Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
Clear1nsight:fix/source-history-fixture-cleanup-20261023
Oct 23, 2026
Merged

Mister-Meeseeks merged 1 commit into
CrocSwap:mainfrom
Clear1nsight:fix/source-history-fixture-cleanup-20261023

Conversation

@Clear1nsight

@Clear1nsight Clear1nsight commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Change and mathematical scope

PR #4963's registered-package planner fails during temporary Git repository cleanup after test_metadata_shape_and_resource_bounds: OSError: [Errno 39] Directory not empty: '/tmp/tmp0i86qfs3/.git'. Package replay never starts. This is a shared test-fixture failure, separate from the submitted PG29 mathematics.

Disable automatic Git maintenance and GC only on commands issued by SourceHistoryTests.git. Real Git 2.55 Trace2 records show 34 maintenance children from the original twelve-test suite and none from the repaired thirteen-test suite. A regression forces automatic work, rejects the unguarded helper, and requires a synchronous positive-control commit to start maintenance. It does not ignore cleanup failures or alter history-validation assertions.

The historical isolated-descendant-bytecode replay authenticates this test from 6f100d4bb5083f8c35d96fd95a539811c62f245c and copies those original bytes into actual_history.py. It never imports the live test. Its source row therefore changes only from usage: input to usage: provenance. The base commit, Git blob 9c52884a4663c089e2331b769b50d14da4575d9f, SHA256 2b974b7c1f5fcb1994c2b76be32554378cec91871224fca0af011d0640dc5514 and every other pin remain unchanged. The current test remains a declared VERIFY.json input for replay selection and committed-byte checks.

Four source-bound regression groups check this distinction: an unimportable live test cannot replace the original pinned historical test; the old live-input role rejects the compatible guard; corruption of the old blob or SHA still rejects; and changing the live test still selects its package and fails uncommitted-byte publication checks. The original verifier, all three commands, task and result bytes are unchanged. No mathematical source, selected result or scientific claim changes.

Task and overlap

Explicit user-assigned failed-workflow repair, based on canonical main b91956876e5b4122fd89179f1b57557ff8378f15. Scope unchanged. #4857 previously repaired the same maintenance lifecycle in the sparse-baseline fixture; this is the separate source-history fixture demonstrated by #4963's actual failure.

Current guidance and the delta-only intake procedure were read. Its refresh fetched canonical main, but queue planning cannot read GitHub because gh is absent. Targeted connector reads and the all-author PR monitor establish current heads and ownership instead. No queue or scientific acceptance decision is made.

This does not duplicate jwr404's active #4973 PYTHONPATH work, JoyboyBrian's #4975 SIGTERM handling, the external #4968 census optimization, or existing starting-head reconciliation repairs.

Validation

Linux, Python 3.12.3, Git 2.55.0. Hosted failure: Python 3.12.15, Git 2.55.0.

python3 -W error -B -m unittest discover -s tests -p test_research_source_history.py -v
python3 -W error -B -O -m unittest discover -s tests -p test_research_source_history.py -v
python3 -W error -B -m unittest discover -s tests -p test_research_descendant_source_roles.py -v
python3 -W error -B -O -m unittest discover -s tests -p test_research_descendant_source_roles.py -v
python3 -B scripts/research_package.py --package research/isolated-descendant-bytecode
python3 -B -m unittest discover -s tests -p 'test_research_*.py' -v
python3 -B scripts/check_research_commit.py --package research/isolated-descendant-bytecode --check-source-history
python3 -B scripts/research_package.py --changed-since b91956876e5b4122fd89179f1b57557ff8378f15 --explain-plan /tmp/source-history-plan.json
python3 -B scripts/export_research_package.py export --package research/isolated-descendant-bytecode --ref HEAD --output /tmp/source-history-fixture-export.tar.gz
PATH=/nonexistent /usr/bin/python3 -B scripts/export_research_package.py check /tmp/source-history-fixture-export.tar.gz

Both focused source-history suites pass thirteen tests; both source-role suites pass ten tests. The original three-command registered package replay passes with its existing partial outcome. The full helper suite passes 367 tests with 11 expected platform skips (218.579 seconds). At commit 00026e07e9ad9192482402901f5895d10e59c6af, committed-byte and source-history checks pass for all 13 declared package/input files, and the planner selects only research/isolated-descendant-bytecode. Official export and its Git-free integrity check pass; export SHA256 is b0bd2f7fa8dc17736057fb036f51886b4d5a81d9cf8f8afc2faeaf5387aea40b. The registered historical scientific replay requires Git; the Git-free check authenticates bundle transport only. Hosted run39905307584 passed at that exact head on its first attempt. The actual planner ran367 helpers/11 expected skips, including the forced-maintenance and four source-role boundary controls, and selected only this package. Its unchanged three registered replay commands and committed-input integrity gate passed; historical outcome remains partial.

The comparison with a new live source pin was rejected: the unchanged historical verifier explicitly reads base_commit:path for every row and does not implement row-level successor-pin dispatch. Adding a same-path successor would either fail its original hash check or substitute different test bytes. The role correction preserves the original experiment and separately tests the live fixture.

Credit

Retains Nick Petalas's source-history tests, Arham Tahir's historical bytecode differential and source credit, roger-sato's earlier source-role correction, and the existing isolated-runner lineage. Repair by Clear1nsight with substantial OpenAI Codex assistance. Existing licence and attribution notices remain intact.

Open next questions

Required handoff. Exact-head upstream planner and the selected original historical replay now pass. Keep other fixture failures evidence-driven; no broad Git policy, source repinning, historical replay campaign or selected-frontier update is proposed.

Preserve the original pinned historical replay while retaining the live test as a planner and publication input. Add real-Git maintenance and source-role regressions.

Prepared with substantial OpenAI Codex assistance.
@jwr404

jwr404 commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Independent check at head 00026e07, on Linux with Git 2.56.0 and CPython 3.12.14.

  • tests.test_research_source_history passed three consecutive runs, so the cleanup race no longer reproduces here.
  • tests.test_research_descendant_source_roles passed 10 tests, including the four new source-role regressions.
  • The diff matches the description. Only SourceHistoryTests.git gains -c maintenance.auto=false -c gc.auto=0. Cleanup failures are not ignored and no history assertion changes. The one SOURCES.json row moves from input to provenance while its commit, blob and SHA-256 stay identical.
  • The reclassification is justified. The live test is never imported by the historical replay (pinned_sources() copies the base-commit blob), and VERIFY.json still lists it as an input, so planner selection and uncommitted-byte checks keep firing. The new tests cover both directions.

This is an author-independent check, not maintainer acceptance.

Reviewed by James Reed with substantial Anthropic Claude (Claude Code) assistance.

@Mister-Meeseeks
Mister-Meeseeks merged commit 9f789e8 into CrocSwap:main Oct 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants