Skip to content

chore(scripts): bounded audit of bookkeeping edits forced on feat and fix PRs #2413

Description

@thymikee

Child 8 of #2409.

Purpose

Find out whether any bookkeeping under scripts/ still forces edits on ordinary feature and fix PRs, and remove only what replays as a saved file without weakening independent evidence. Bounded: close with no implementation if nothing qualifies.

Baseline

Measured on main at e7d97f7dfe, recent 456 code commits:

  • 24% of feat+fix commits touch scripts/; 8% touch scripts/layering/. Refactor commits: 67% and 61%. The layering churn is the migration's own cost and fell from 35 to 6 per 100 commits.
  • feat+fix files under scripts/ with the most edits: scripts/layering/package-boundaries.test.ts 6, scripts/__tests__/eager-closure-budgets.ts 5, scripts/maestro-conformance/build-manifest.mjs 4, scripts/maestro-conformance/corpus/manifest.json 4, scripts/__tests__/test-file-size-ratchet.test.ts 4.
  • Already ruled out: the eager-closure budget and the test-file-size ratchet compare against the merge-base and need a hand row only for approved exceptions; the package export snapshot in package-boundaries.test.ts:55 is an independently reviewed surface by design; Maestro fixtures are pinned upstream artifacts. Replaying the removal of every such edit over the recent 186 feat+fix commits moves the median files per commit from 8 to 8.

Required work

  1. Take the ten most recent feat or fix commits that touched scripts/. For each scripts/ file edited, classify the edit: independent evidence (keep), approved exception row (keep), or duplicate bookkeeping that restates something the same PR already declares elsewhere.
  2. For each duplicate, show the historical replay: the same PR with that edit removed and the check still red against a planted violation.
  3. Remove only those. Post the table either way.

Acceptance

  • The table of ten commits with a classification per scripts/ edit is posted on this issue.
  • Each removal shows a replay of F → F−1 on a real historical commit and a red gate against a planted violation.
  • No gate is replaced by self-comparison of the implementation under test.

Non-goals

  • Touching the layering gates while the extraction program is still running.
  • Regenerating Maestro conformance fixtures in ordinary tests.

Activity

  1. thymikee commented on Sep 9, 2026

    @thymikee
    MemberAuthor

    Bounded audit: ten most recent feat/fix commits touching scripts/

    Commits (newest first), git log --no-merges on origin/main (head e7d97f7dfe), filtered to subjects starting with feat/fix and touching scripts/:

    # Commit Subject
    1 d11c8cf9d6 feat: support standalone Maestro clearState command (#2366)
    2 3f022b0730 fix(gates): stop an eager-closure approval from turning main red on merge (#2375)
    3 7bea29d61e fix: repair main after the managed-allocation move landed under stale PRs (#2328)
    4 ebdaa7617e feat: delegate reviewed managed automation (#2312)
    5 96727a0b42 fix(apple-runner): never compare an unavailable toolchain probe; name the mismatching cache keys (#2306)
    6 fa06c8c6e9 fix(daemon): fence managed readiness behind runtime admission (#2280)
    7 5bb3ea3b2a feat(ios): productionize Simulator AX snapshot bridge (#2277)
    8 172ee149cf feat(screenshot): add --crop-on to crop captures to a selector frame (#2276)
    9 658f822c40 fix: encode the mcp subcommand in server.json package arguments (#2275)
    10 e882cf9723 feat(runtime): add managed-local ownership and the exact-only managed runtime (#2258)

    Per-file classification

    # Commit scripts/ file Classification
    1 d11c8cf fuzz/validation-arbitraries-maestro.ts independent evidence — new fuzz coverage for the clearState command shape
    1 d11c8cf maestro-conformance/build-manifest.mjs approved exception row — generator's NOTES map for the new authored corpus flow
    1 d11c8cf maestro-conformance/corpus/authored/clear-state.yaml approved exception row — pinned corpus fixture
    1 d11c8cf maestro-conformance/corpus/manifest.json approved exception row — generated manifest entry paired with the build-manifest.mjs NOTES row above (generator + checked-in output, not a redundant check)
    1 d11c8cf fixtures/layer1-parser.json approved exception row — pinned upstream parser fixture
    2 3f022b0 __tests__/committed-source-tree.ts independent evidence — new headCommit helper backing the merge-base-is-head fix
    2 3f022b0 __tests__/eager-closure-budgets.test.ts independent evidence — coverage for the new staleApprovalRows rule
    2 3f022b0 __tests__/eager-closure-budgets.ts independent evidence — genuine mechanism fix (merge-base-vs-head bug), not bookkeeping
    3 7bea29d __tests__/eager-closure-budgets.ts approved exception row — stale APPROVED_OVER_CEILING row removed exactly as the rule prescribes
    4 ebdaa76 layering/package-boundaries.test.ts approved exception row — independently reviewed export-snapshot surface (established)
    5 96727a0 write-xcuitest-cache-metadata.mjs independent evidence — production CI script logic fix (fail-closed toolchain probe)
    6 fa06c8c layering/architecture-ownership.ts approved exception row — same archetype as the package-export snapshot: architecture-ownership.test.ts asserts the façade's actual named exports against this hand-declared list, so it is an independently reviewed surface, not a restatement of anything else in the PR
    7 5bb3ea3 __tests__/fixtures/size-report-npm-pack.json independent evidence — fixture data for new test cases in the same PR
    7 5bb3ea3 __tests__/size-report-package.test.ts independent evidence — new assertions for assertPublishPackageContents's new requireSnapshotBridge behavior
    7 5bb3ea3 check-package.ts independent evidence — separate install path (installIntoCleanConsumer) exercising the same invariant size-report-install.mjs exercises on its own (benchmark) install path; distinct call sites, not a restatement
    7 5bb3ea3 ios-snapshot-benchmark/size-install.test.ts independent evidence — new coverage for assertInstalledSnapshotBridge
    7 5bb3ea3 layering/package-boundaries.test.ts approved exception row — export-snapshot surface (established)
    7 5bb3ea3 layering/platform-package-policy.test.ts approved exception row — same hand-declared-surface archetype as architecture-ownership, applied to the new snapshot-source subpath
    7 5bb3ea3 layering/platform-package-policy.ts approved exception row — declares the new snapshot-source subpath the policy test above checks
    7 5bb3ea3 size-report-install.mjs independent evidence — post-install-directory check; distinct failure mode from the packed-tarball check below (catches install-time/publishing divergence, not packaging-config divergence)
    7 5bb3ea3 size-report-package.mjs independent evidence — packed-tarball-listing check (assertSnapshotBridgeAssets), distinct from the post-install check above
    8 172ee14 integration-progress-model.ts approved exception row — new named exemption row (screenshotCropOn) with owner + reason, same pattern as APPROVED_OVER_CEILING
    8 172ee14 layering/package-boundaries.test.ts approved exception row — export-snapshot surface (established)
    9 658f822 sync-mcp-metadata.mjs independent evidence — production sync-script logic fix (adds the missing mcp positional argument)
    10 e882cf9 layering/package-boundaries.test.ts approved exception row — export-snapshot surface (established)

    Result

    No file edit across the ten commits classifies as duplicate bookkeeping. Every scripts/ edit is either:

    • independent evidence (a real behavior/test change backing the PR's own fix or feature), or
    • an approved exception row (a hand-maintained, independently-checked declaration — merge-base-relative budget rows, the package/façade export-surface snapshots, or a named test-exclusion row with owner and reason).

    No removal is proposed. Per the issue's bounded-audit acceptance criteria, closing with no implementation.

  2. thymikee commented on Sep 9, 2026

    @thymikee
    MemberAuthor

    Audit complete: the ten-commit classification table is posted above and found no duplicate bookkeeping — every scripts/ edit in feat/fix PRs is independent evidence or an approved exception row. Closing with no implementation, as the issue specified. Part of #2409 (child 8: forecast 0, confirmed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions