Skip to content

perf(coordinator): accelerate registry validation with bounded probes - #55

Merged
anthonyprintup merged 13 commits into
mainfrom
codex/experimental-generation-engine
Nov 16, 2026
Merged

anthonyprintup merged 13 commits into
mainfrom
codex/experimental-generation-engine

Conversation

@anthonyprintup

@anthonyprintup anthonyprintup commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Registry validation previously took 751.875 seconds on the original consumer workload. This change enables bounded parallel probes on supported Windows/NTFS configurations, with full reference validation when capability or observation checks cannot establish a safe result.

Existing protocol-v1 registries, CMake configuration, publication and recovery remain compatible. Upgrades require no migration, registry reset or new dependency. Review fixes cover incomplete/mixed helper installations, worker retirement failures, interrupted native calls and uncertain handle cleanup.

Qualification on the final source:

  • Python 3.14 suite: 1,983 passed, 41 skipped.
  • CMake packaging/integration: 22 passed, 1 skipped.
  • Actual-source upgrade, rollback, recovery and compatibility checks: 115 passed.
  • Ten default validations of the original 2,239-claim / 11-plan workload: 18.658–36.119 seconds, median 20.696 seconds. Every run used the index with verified observations, retired workers and balanced native handles. Ownership-lock wait is measured separately.
  • Final preservation audit: registry records and all 232 generated files, including modification times, unchanged; no ownership/output mutations or tokens produced.
  • All 23 CI checks passed at qualified head bb2db5576805dfa26bdca7ee9717ddb16807ff50.

The maintainer accepted the observed 36.119-second validation time for merging. Measurements remain recorded locally.

All investigation reports and internal design documents have been removed from the final tree. Documentation changes are limited to user-facing troubleshooting and the reference-validation override.

Refs #54.

Run venv through a small wrapper that catches bootstrap subprocess failures
before the standard CLI discards their captured output. Preserve the selected
interpreter, isolation, platform defaults, timeout, and existing rollback path.

Redact URLs before truncation, remove control characters, bound each captured
stream to 16,384 characters, and report the original child exit status without
printing the child command or environment.

Install the helper with the CMake package, document the diagnostic behavior,
and cover real nested child failures, missing modules, rollback refusal,
credential redaction, and successful environment creation. Extend the Windows
Python 3.12-3.14 CI matrix with the new regressions.

Validated focused tests on Windows with Python 3.12 and 3.14, normal and
relocated-install provisioning, transaction/documentation tests, Ruff, and
the private-path guard.

Fixes #51
- Replace repeated physical ancestor searches with comparison-local directory
  identity observations while retaining fresh projections and reverse checks.
- Remove the progress reporter lifetime cap and duplicate projection existence
  searches without changing shared lock ordering or ownership persistence.
- Isolate CMake test registries and add alias, replacement, depth and progress
  regressions.
- Extend isolated scaling/profiling tools and preserve sanitized measurements,
  architecture analysis and the proposed indexed generation-engine design.

Validation before this checkpoint: Python 3.14 unit suite 1724 passed/41 skipped;
focused CMake suite 16 passed/1 skipped; Python 3.12.9 coordinator suite 87 passed/
6 skipped. Ruff and git diff --check passed. The under-30-second indexed engine
remains an explicitly unimplemented proposal at this checkpoint.
Add a filesystem-independent lexical and physical reservation index and a
scoped sampled-authentication preview. Keep reference validation as the default
and the sole authority in optional shadow mode; every reference rejection is
preserved and preview disagreement fails closed before normal reconciliation.
Do not provide index-only authorization or change record formats and lock order.

Install the optional helper beside the coordinator without prefix bytecode
writes. Cover relocation, ownership exemptions, sampled-path races, parser
failures, sample expiry, read-only behavior and the existing token protocol.

Extend isolated benchmarks with explicit shadow phases, alternate layouts,
source-bundle fingerprints and drift rejection. Record the exact 2172-claim,
11-plan read-only phase at 28.480 seconds plus 1.184 seconds current-plan
validation, clearly excluding authority, setup and the required reference pass.
Document the unresolved filesystem lifetime proof and defer production promotion.

Validation: full default Python regression suite; CMake integration 17 passed,
1 skipped; shadow coordinator 87 passed, 6 skipped; Python 3.12 coordinator/index
113 passed, 6 skipped; final multi-target full shadow benchmark agreement;
Ruff and whitespace checks. No C++ sources or generated smoke outputs changed.
…eview

Create the output root before placing the unowned file symlink in the reset
regression. Skip only recognized permission or unsupported-operation errors so
missing-parent and other unexpected failures cannot masquerade as absent link
support. Verify the external file remains intact after reset rejection.

Document 33 isolated cross-version checks against issue #54's exact public
protocol-v1 baseline: upgrade/rollback, no-op output and token preservation,
publication/initialization/reset crash recovery, and shared registry locks in
both process directions. Record the unchanged reference-validator and mutation
implementations, plus host-specific coverage gaps and the unresolved fast-mode
consistency proof. No production coordinator or benchmark source changed.

Validation: cross-version cases 31 passed; mixed-version lock cases 2 passed;
reset suites in reference and shadow modes each 14 passed, 2 skipped; Ruff and
whitespace checks. The corrected file-symlink case now skips for the genuine
Windows privilege restriction rather than a missing output directory.
Add a Windows path reader using fresh no-reparse native opens, bounded handle
lifetimes and explicit syscall/resource counters. Recheck missing paths on every
call and retain existing physical ancestry comparisons. Support only a private
native-shadow mode that always runs reference validation before normal mutation;
known unsupported capabilities fall back to reference and other disagreements
fail closed. No authoritative index mode or automatic promotion is introduced.

Install the optional helper beside the coordinator without prefix bytecode
writes. Preserve protocol v1 and ownership keys, including reference fallback
for explicit Windows namespace paths. Keep record paths fresh in the existing
sampled preview. Fingerprint all three helpers in both benchmark tools.

Add a real attribute-only directory-to-junction counterexample showing that
read-sharing restrictions do not prove a topology lease. Cover fresh missing
and existing paths, Unicode, reparse rejection, permission/status errors, scope
expiry, handle cleanup, fallback and upgrade-token preservation. Record the
bounded pilot failure: 9.197 and 11.421 seconds for the native phase at only
64 claims/11 plans, with reference phases still mandatory. Document the unproven
operation-wide lifetime and failed timing gate; the index remains disabled.

Validation: 1772 default tests passed, 41 skipped; native-shadow coordinator
87 passed, 6 skipped; CMake integration 18 passed, 1 skipped; final installed
prefix checks 2 passed; minimum-Python observation/index checks 48 passed;
51 isolated public-baseline upgrade/rollback/recovery cases passed; Ruff and
whitespace checks. No C++ or generated smoke files changed.
Add a private commit-shadow experiment that authenticates every ownership
record, reuses provisional positive geometry, and requires exact file-ID/USN
close witnesses before accepting its read set. Keep missing-path comparisons
fresh in both directions and close ordinary directory handles immediately.
Restrict positive reuse to canonical spellings because case-mode changes need
not advance NTFS USNs. Unsupported, changed, or failed observations fall back
to the reference validator, which remains the default and sole authority.

Install the helper beside the coordinator, add native filesystem accounting
and complete read-only candidate benchmarks, and publish the consistency
contract plus source-fingerprinted measurements. Remove the slower bounded
parent-lease variant. Final quiet 2,172-claim/11-plan samples take 18.58-25.32s;
a fourth 22.06s candidate agrees with the full 310.04s reference oracle.
Reliability, contention and consistency qualification remain open, so no
indexed authorization mode is enabled.

Reject dangling retained plan links and inaccessible metadata instead of
treating them as absent; only FileNotFoundError permits a missing record.
Add native ABA, witness-corruption, fallback, lifecycle, ownership partition,
and packaging coverage, plus an offline old/new upgrade qualification driver.
Preserve protocol v1, claim tokens, lock paths, and recovery/publication formats.

Validation:
- Default suite: 1,834 passed, 41 skipped.
- Commit-shadow coordinator suite: 89 passed, 6 skipped.
- Minimum Python 3.12 observation/index and metadata suite: 109 passed.
- CMake and installed relocation: 19 passed, 1 skipped.
- Upgrade/rollback and nine crash cuts: 71 passed cases.
- Final-source shadow/reference agreement on both synthetic layouts.
- Ruff, formatting, source fingerprints, and private-path guard passed.
- Identify the retained 751.875-second workload anonymously and authenticate
  its full current 2,239-claim, 11-plan registry without reconciling or publishing.
- Add guarded read-only qualification, byte-identical frozen reference oracles,
  source fingerprints, and generated-byte/mtime and ownership preservation audits.
- Prototype the indexed validation entry point behind a closed source promotion
  guard; consumer commands and ordinary API calls retain reference authority.
- Coordinate native observers separately from the unchanged ownership locks,
  reject duplicate volume bindings, and preserve reference cleanup and diagnostics.
- Exercise dirty end witnesses after the last version read, incomplete
  certificates, fresh mutation-time checks, and backend-consistent fault injection.
- Extend offline old/new protocol-v1 qualification through indexed fixtures and
  crash cuts, preserving claim tokens and publication/recovery compatibility.
- Reject unsafe source topology before freezing a ledger and remove a reproduced
  formatter-test startup race while retaining descendant-termination assertions.

Validation: 1,863 default tests passed (41 platform/capability skips); 137 Python
3.12 checks passed; 89 indexed coordinator tests passed (6 platform skips);
91 cross-version cases passed; 21 CMake tests passed (1 platform skip), followed
by 5 final-source relocated-install checks. Ruff and private-path checks pass.

The ten-run integration gate measured 25.668-41.542 seconds, median 33.323,
with only four samples below 30 seconds. Keep promotion disabled. Preserve
the anonymous measurements and complete native counters for review.

Refs #54.
Freeze prepared endpoint views before dispatching bounded batches to four
workers. Preserve every fresh negative probe, synchronize accounting, and
drain native work behind an admission fence before sealing or root release.
Abort before mutation when worker retirement cannot be proved. Reject
impersonating, emulated, and uncertain worker contexts to reference validation.

Enable automatic committed-index validation on capable Windows invocations
after 20 complete retained-workload runs stayed under 30 seconds, including
ten under concurrent full reference-reader load. Keep reference fallback and
add environment/CLI reference overrides without changing protocol-v1 records,
tokens, ownership locks, publication, or crash recovery.

Qualify interruption, late submission, shutdown, reverse-probe races, mixed
helpers, and 1024 serial/parallel differential cases. Preserve deliberate
test concurrency while isolating unrelated journal-marker tests. Record
anonymous per-run metrics, unchanged-output audits, independent full oracles,
source fingerprints, and final packaging/minimum-Python/upgrade evidence.

Validation: 1927 default tests; 89 explicit indexed tests; 201 Python 3.12
native/index tests; 22 CMake integration tests; 111 cross-version upgrade,
rollback, and crash-recovery cases; Ruff. Formal validation ranges were
14.489-16.538 seconds at the enabled default and 23.003-27.461 under load.

Refs #54.
Record the upstream squash of the already-preserved packaging diagnostics
change. Verify the merge leaves the qualified source tree byte-identical,
so review against main contains only the experimental validation work.
…rage

Accept the existing POSIX ENOTDIR diagnostic when ancestor replacement is
rejected before explicit parent inspection. Keep the required CoordinatorError
and ownership rejection rather than changing the runtime path handling.

Fetch repository history in plugin CI so the pinned previous-helper test runs
against its actual implementation instead of failing in a shallow checkout.
Document both initial CI failures and preserve every production source hash
and the completed twenty-run qualification evidence.

Validation: Ruff for src/tests; three ancestor-replacement/older-helper cases
in reference mode; both ancestor-replacement cases in explicit indexed mode.
Production implementation bytes are unchanged from the qualified source.
Apply the quiet-observer test gate to integration cases only when the selected
run also contains quiet native observers. Retain serialization for mixed runs
and native cases while avoiding an unnecessary lock across every CMake-only
test. Production locking, native probes, and all measured source bytes remain
unchanged.

Verify selection after marker deselection for native-only, CMake-only, and
mixed invocations. Record the mixed native/CMake pass (168 passed, 1 skipped)
and four-worker CMake-only pass (22 passed, 1 skipped in 35.91 seconds).

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T23:20:16.272257Z bb2db55 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 1d1e1b030c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Require typed EOF helper contracts in callers and helper entry points so a
valid-but-truncated or mixed installation cannot skip staging comparisons.
Protect older coordinators through the same helper entry checks without
changing protocol-v1 records, tokens, lock identities, publication or recovery.

Retire admitted native work even if admission/completion bookkeeping fails,
and recheck the drain fence if a final worker notification is lost. Close
unpublished handles after interrupted opens. Treat uncertain native releases
and final accounting failures as fatal before fallback authorization; never
retry a numeric handle whose OS close may already have completed.

Keep routine tests independent of experimental git history and move actual
pinned old/helper/coordinator interoperability checks into the explicit
115-case upgrade qualifier. Add fault, partial-source, backward-caller and
cleanup regression coverage, including a non-mutating reproduction of the
pre-review truncated-helper false acceptance.

Close production index promotion after repeat complete validation reached
30.115 seconds on the fifth loaded sample. Preserve all samples and source
fingerprints; single old/new controls do not replace the failed timing gate.
Record both complete reference acceptances and unchanged-ledger/output audits.

Validation: 1983 full tests; 89 explicit indexed tests; 257 minimum-Python
native/index tests; 22 CMake integration tests; 115 upgrade/recovery cases;
Ruff; AST/source preservation and privacy checks. No consumer migration,
cache reset, token rotation or new configuration is required.
@anthonyprintup anthonyprintup changed the title perf(coordinator): qualify indexed validation with bounded parallel probes perf(coordinator): harden registry validation and gate experimental index Nov 16, 2026
…docs

Enable automatic native indexed validation on supported Windows installations
after correctness, concurrency, cleanup and upgrade qualification. Preserve
all runtime capability, witness, worker-retirement and handle-cleanup checks,
with full reference fallback and no protocol-v1 migration or token rotation.
The observed 30.115-second loaded result was explicitly accepted for merging.

Remove the 21 investigation reports, design notes, internal contracts and
measurement datasets from the final documentation tree. Retain the evidence
locally and limit the public documentation change to progress, automatic
validation and reference-fallback troubleshooting. Restore the original
contributor guide and use production descriptions and progress labels.

Validation: 1983 default tests, 22 CMake packaging tests and all 115 actual-source
upgrade/recovery cases passed with production enablement active. Fresh-process
original-workload default checks have verified index authority and complete
cleanup; all completed measurements remain recorded locally.
@anthonyprintup anthonyprintup changed the title perf(coordinator): harden registry validation and gate experimental index perf(coordinator): accelerate registry validation with bounded probes Nov 16, 2026
@anthonyprintup
anthonyprintup marked this pull request as ready for review November 16, 2026 23:18
@anthonyprintup
anthonyprintup merged commit dff0bc1 into main Nov 16, 2026
23 checks passed
@anthonyprintup
anthonyprintup deleted the codex/experimental-generation-engine branch November 16, 2026 23:18
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