Skip to content

perf(cmake): reduce output registry reconciliation work - #52

Merged
anthonyprintup merged 1 commit into
mainfrom
codex/fix-registry-scaling
Oct 4, 2026
Merged

anthonyprintup merged 1 commit into
mainfrom
codex/fix-registry-scaling

Conversation

@anthonyprintup

Copy link
Copy Markdown
Owner

Fixes #50.

Reconciling several output plans rescans and reloads the retained registry for each plan, while overlap checks repeatedly project the same paths. This reduces that repeated work and makes slow reconciliation report its current phase.

  • Validate all current plans against one registry scan and authenticate each retained claim/plan once per operation. Keep the registry lock through single-plan commits as well as batch commits.
  • Project overlap inputs once per comparison and combine Windows link metadata probes. Keep physical identity checks live and reject file, symlink, or junction replacements during those checks.
  • Emit bounded progress/timing diagnostics on stderr for lock waits and active work, including counts without consumer paths. Forward stderr through CMake while preserving the stdout token protocol.
  • Add an isolated scaling benchmark, regression coverage for ownership and filesystem changes, and documentation.

Measured against ca3200bfc8b4cecbfb7fc4d45f2cac85919bdd33 on Windows with CPython 3.12.9. These are median reconciliation wall times from three alternating baseline/candidate samples per case; registry seeding is timed separately and excluded.

Retained claims / current plans Baseline This change Reduction
8 / 4 7.180 s 0.661 s 90.8%
16 / 4 12.554 s 1.011 s 91.9%

Both cases reduce registry scans from 4 to 1. Recorded-plan loads during validation fall from 32 to 8 and 64 to 16; path projections during validation fall from 9,820 to 481 and 18,716 to 913, respectively. Filesystem caches, path depth, and machine activity affect wall times; these workstation results are not a CI performance guarantee.

To reproduce with a checkout of the baseline revision at ../protocyte-baseline:

python tests/benchmark_output_registry.py --baseline-source ../protocyte-baseline --claims 8 16 --plans 4 --repeat 3

Validation:

  • python -m pytest -q -n 4: 1,708 passed, 41 skipped.
  • python -m pytest -q -m cmake_integration tests/test_output_coordinator_cmake.py: 15 passed, 1 skipped.
  • ruff check src tests cmake/ProtocyteOutputCoordinator.py: passed.
  • git diff --check: passed.

Local verification was on Windows; cross-platform CI remains to run.

Keep the registry lock through single-plan commits and authenticate retained
claim and plan records once per reconciliation batch.

Project overlap inputs once per comparison, combine Windows link metadata
probes, and reject file/link/junction replacements during physical identity
reads without retaining filesystem observations across comparisons.

Add bounded path-free progress diagnostics on stderr, expose them through
CMake, and keep the stdout claim-token protocol intact.

Add an offline scaling benchmark and regressions for operation counts,
ownership races, physical aliases, path replacement, and live diagnostics.
Document benchmark use and reconciliation progress.

Validation: 1708 default tests passed, 41 skipped; 15 coordinator/CMake tests
passed, 1 skipped; Ruff and whitespace checks passed. Three alternating
Windows/Python 3.12.9 samples per case reduced median reconciliation wall
time by 90.8% (8 claims/4 plans) and 91.9% (16 claims/4 plans).
@anthonyprintup

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T13:06:21.133840Z 180f746 Manual request
ℹ️ 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.

Repository owner deleted a comment from chatgpt-codex-connector Bot Oct 4, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 180f746f77

ℹ️ 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".

@anthonyprintup
anthonyprintup merged commit 72fc908 into main Oct 4, 2026
23 checks passed
@anthonyprintup
anthonyprintup deleted the codex/fix-registry-scaling branch October 4, 2026 13:20
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.

Output reconciliation repeatedly scans retained claims and performs expensive path validation on Windows

1 participant