Skip to content

Keep managed lineage runtime state invisible to Git - #5261

Merged
Trecek merged 10 commits into
developfrom
impl-runtime-state-git-invisibility-20261010
Oct 11, 2026
Merged

Trecek merged 10 commits into
developfrom
impl-runtime-state-git-invisibility-20261010

Conversation

@Trecek

@Trecek Trecek commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

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 .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.

Historical prerequisites at this PR’s merge

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:

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. 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_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.

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.

@Trecek
Trecek marked this pull request as ready for review October 11, 2026 04:03
@Trecek
Trecek added this pull request to the merge queue Oct 11, 2026
Merged via the queue into develop with commit 4ad68c2 Oct 11, 2026
11 checks passed
@Trecek
Trecek deleted the impl-runtime-state-git-invisibility-20261010 branch October 11, 2026 04:14
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.
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.

1 participant