Repository navigation
Keep managed lineage runtime state invisible to Git - #5261
Merged
Merged
Conversation
Trecek
marked this pull request as ready for review
October 11, 2026 04:03
Trecek
added a commit
that referenced
this pull request
Oct 13, 2026
Managed headless launches currently leave lineage records visible to Git, so the clone gate can treat AutoSkillit's runtime state as user changes and refuse a clean checkout. This change gives the existing lineage namespace its own ignore marker, validates that marker before creating record directories, and repairs missing markers when a store operation reads an older namespace. The temp directory and lineage store share the marker writer. Doctor and the root guards share the marker predicate; committed project directories are classified explicitly. Real-Git tests cover launch cleanliness, legacy repair, dispatch state, and continued detection of user edits. The static guard rejects unclassified `.autoskillit` children in production source. Related issue: #5258. This PR remains draft pending the maintainer-owned policy registration. ## Validation - `pre-commit run --all-files` passed before each commit. - Manual real-Git probe: `before=[]`, `after=[]`; tracked ignore file unchanged; doctor OK. - Mutation checks rejected both literal-root and root-variable path spellings; the temporary mutations were removed. - Configured `test_check` (`task test-local-gate`) passed on `068f570b6`: 47,307 passed, 610 skipped, 29 xfailed. - The independent catalog row-count oracle is synchronized with the added guard row. - `core/io/io.py` measures 749 non-import lines against its 750-line limit. ## Required before completion A maintainer must add this prescribed entry to `POLICY_SURFACES` in `tests/arch/_acceptance_policy_surfaces.py`, then rerun the configured `test_check` gate after that policy change: ```python PolicySurface( "tests/arch/test_autoskillit_root_children_registered.py", "_CLASSIFIED_ELSEWHERE", "int_map", default=0, ), ``` The verified plan explicitly reserves that file for human edits, so it is unchanged in this PR. The post-merge E2E replay and PR #5255 commissioning remain operator-run checks. Separate follow-up trackers should be linked before closing #5258; this PR does not close the issue automatically. ## Audit response The audit's blocking REQ-006 finding used physical lines (`wc -l`) instead of the repository's defined budget count. `tests/arch/_line_budget.py::count_budget_lines` excludes import-statement spans, and `scripts/check_file_lengths.py` delegates to that function. | Revision | Physical lines | Excluded import lines | Enforced budget lines | |---|---:|---:|---:| | Plan base `265f1e00e` | 766 | 23 | 743 | | PR implementation | 772 | 23 | 749 | The unchanged cap is 750 non-import lines. The plan's starting and final budget counts were correct, and its stop-and-report condition was not triggered. Direct `check_file(io.py)` returns no violation. No exemption, counter/cap change, unrelated trim, or module split was needed. The three ODD test identifiers now exactly match the verified plan in `6194da647`; their assertions and production behavior are unchanged. The gated rerun found one additional integration omission: the independent catalog-count oracle still expected the old table. `068f570b6` synchronizes that oracle while retaining its strict equality assertion, and the next full configured gate passed. E-3 remains deferred for the reason stated in both the plan and audit: it requires the post-merge integration state and operator-run E2E commissioning. The human-owned policy registration above remains a separate prerequisite; no official re-audit GO verdict or merge completion is claimed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #5258
Managed headless launches currently leave lineage records visible to Git, so the clone gate can treat AutoSkillit's runtime state as user changes and refuse a clean checkout. This change gives the existing lineage namespace its own ignore marker, validates that marker before creating record directories, and repairs missing markers when a store operation reads an older namespace.
The temp directory and lineage store share the marker writer. Doctor and the root guards share the marker predicate; committed project directories are classified explicitly. Real-Git tests cover launch cleanliness, legacy repair, dispatch state, and continued detection of user edits. The static guard rejects unclassified
.autoskillitchildren in production source.Related issue: #5258. This PR remains draft pending the maintainer-owned policy registration.
Validation
pre-commit run --all-filespassed before each commit.before=[],after=[]; tracked ignore file unchanged; doctor OK.test_check(task test-local-gate) passed on068f570b6: 47,307 passed, 610 skipped, 29 xfailed.core/io/io.pymeasures 749 non-import lines against its 750-line limit.Historical prerequisites at this PR’s merge
A maintainer must add this prescribed entry to
POLICY_SURFACESintests/arch/_acceptance_policy_surfaces.py, then rerun the configuredtest_checkgate after that policy change:The verified plan explicitly reserves that file for human edits, so it is unchanged in this PR. The post-merge E2E replay and PR #5255 commissioning remain operator-run checks. The three adjacent repairs were subsequently delivered together in #5263 without new trackers. The policy registration was subsequently merged in #5264; current clone-verification evidence is recorded in #5258.
Audit response
The audit's blocking REQ-006 finding used physical lines (
wc -l) instead of the repository's defined budget count.tests/arch/_line_budget.py::count_budget_linesexcludes import-statement spans, andscripts/check_file_lengths.pydelegates to that function.265f1e00eThe unchanged cap is 750 non-import lines. The plan's starting and final budget counts were correct, and its stop-and-report condition was not triggered. Direct
check_file(io.py)returns no violation. No exemption, counter/cap change, unrelated trim, or module split was needed.The three ODD test identifiers now exactly match the verified plan in
6194da647; their assertions and production behavior are unchanged. The gated rerun found one additional integration omission: the independent catalog-count oracle still expected the old table.068f570b6synchronizes that oracle while retaining its strict equality assertion, and the next full configured gate passed.At this PR’s merge, E-3 and the policy registration were deferred. Those #5258 prerequisites have since been completed by #5264 and the two post-merge clone-admission replays recorded in #5258. Full #5255 commissioning still fails separately; no official re-audit GO is claimed.
Follow-up completion — 2026-10-11
#5263 completed the adjacent repairs, #5264 registered the restored policy map, and both post-merge default clone invocations succeeded in runs 38170521660 and 38170536595. See #5258 for the exact receipts and the separately failed full-commissioning outcomes.