Expand OPT with contract-driven optimization framework - #3
Conversation
There was a problem hiding this comment.
Sorry @EmergentMonk, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 3 days and 14 hours by commenting @sourcery-ai review. Upgrade to get a review now.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer's GuideThis PR expands OPT with a contract-first optimization framework and 11 provenance-bounded post-v1 records while keeping the pinned v1 Lean formalization immutable. It also updates human- and machine-facing catalog guidance, records licensing/evidence boundaries, and adds a CI integrity gate for record structure and catalog coverage. Sequence diagram for catalog integrity validationsequenceDiagram
participant PR as PullRequest
participant CI as CatalogIntegrityWorkflow
participant Check as check_catalog.py
participant Repo as CatalogFiles
PR->>CI: trigger catalog-integrity
CI->>Repo: checkout repository
CI->>Check: run check_catalog.py
Check->>Repo: inspect record headings and IDs
Check->>Repo: validate post-v1 contract sections
Check->>Repo: verify README/CATALOG links and coverage
Check-->>CI: pass or fail integrity result
CI-->>PR: report catalog check
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be2925b427
ℹ️ 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".
|
@codex please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd9e84c217
ℹ️ 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".
|
@codex please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d5dbd96f1f
ℹ️ 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".
|
@codex please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b190a3cb91
ℹ️ 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".
|
@codex please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f408a3e63
ℹ️ 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".
|
@codex please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f75ecc9b9d
ℹ️ 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".
|
@codex please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c2b00d1341
ℹ️ 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".
|
@codex please review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e01d9a1a7e
ℹ️ 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".
|
@codex please review |
|
@codex please review the current head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 809d149a85
ℹ️ 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".
|
@codex please review the current head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0082a1c6df
ℹ️ 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".
|
@codex please review the current head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4d8e39c080
ℹ️ 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".
|
@codex please review the current head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f530f052ce
ℹ️ 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".
|
@codex please review the current head |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8fdf5fa9d5
ℹ️ 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".
|
@codex please review Review this exact SHA Verification context: all current review threads are resolved and CI is green on this SHA — catalog-integrity |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
This PR expands OPT beyond its frozen v1.0.0 five-record catalog without modifying the pinned v1 Lean model.
Adds a canonical optimization problem contract
Introduces
OPTIMIZATION-PROBLEM.mdwith:P = (X, F, f, d, C, B, S)for search space, feasible set, objective, direction, correctness/semantic constraints, evaluation budget and stopping rule.
Adds 15 post-v1 optimization records
OPT-INC-001— signature-bound incremental executionOPT-COAL-001— concurrent duplicate-work coalescingOPT-SET-001— density-adaptive compact setsOPT-CONT-001— partitioned coordination domainsOPT-FAN-001— shared materialization for fan-out/replayOPT-SEARCH-001— budget-aware adaptive parameter searchOPT-APPROX-001— contract-bounded approximationOPT-REDUCE-001— early working-set reductionOPT-CRIT-001— critical-path prioritizationOPT-BUDGET-001— performance regression budgetsOPT-PRUNE-001— bound-driven search-space pruningOPT-SIMD-001— evidence-gated native autovectorizationOPT-SOA-001— worker-local SoA tilingOPT-POOL-001— persistent topology-aware worker poolsOPT-AUTO-001— calibrated host-aware path promotionThe final four records are derived from merged
QSOLKCB/GALAXYPRs #10–#14 and preserve the donor's evidence boundaries rather than promoting hardware-specific constants as universal settings.Provenance/source notes
Adds bounded source notes for:
Historical/external numbers are explicitly not promoted into portable performance targets.
Machine-facing, catalog and roadmap updates
Updates
README.md,CATALOG.md,README4AI.md,AGENTS.md,ROADMAP.md, and the optimization-record template so future records must define the target problem before selecting or tuning a mechanism.Integrity gate
Adds a dependency-free catalog integrity pipeline split across:
scripts/check_catalog.py— public entrypoint;scripts/check_catalog_normalizer.py— isolated normalization/execution boundary;scripts/check_catalog_core.py— record/schema, rendered-link and provenance validation.The gate checks record identity and heading structure, post-v1 mandatory sections and contract fields, README/CATALOG coverage, visible record-link targets/fragments, source-evidence identities, frozen-v1 presence, and CommonMark/HTML edge cases used by the supported validator subset.
Regression coverage includes both focused parser tests and a public-entrypoint suite derived from external audit reproductions. The public suite exercises positive and negative controls through
python3 scripts/check_catalog.pyin disposable fixtures rather than only importing internal helpers.Formalization boundary
This PR deliberately does not edit:
Lean/OPTFormal/Core.leanLean/OPTFormal/FrozenV100.leanLean/OPTFormal.leanThe v1.0.0 five-record model remains immutable. New records are catalog guidance, not theorem-backed merely by association.
Donor-policy note
Mechanisms are described independently with provenance and licensing boundaries. GPL Wonderbuild implementation code is not copied into this Apache-2.0 repository. GALAXY is also Apache-2.0 at the pinned donor revisions, but these records still promote reusable mechanisms and evidence structure rather than source-project constants or benchmark claims.
Review / merge boundary
The validator has received repeated adversarial review for rendered Markdown/HTML edge cases. Fixes are retained with regression coverage rather than narrowing accepted syntax merely to make CI green. Final merge should remain conditional on the current head passing the catalog, Python and Lean workflows and on any repository approval/conversation rules visible in GitHub.
Final Astra corrective pass
An external Astra High audit of head
31346c5e7f6562d2faa7f5864d50d3711f81d249was supplied as an audit-only bundle and its ZIP SHA-256 was verified as:facd684605b2e5355a404e52bb4c4f11e250711730370afa916c3930058ecf0aThe bounded corrective pass addresses audit findings F1–F5 without broad parser refactoring or additional catalog expansion:
The complete 38-case Astra matrix is retained in
tests/test_astra_31346c5_audit.pyand passes through the publicpython3 scripts/check_catalog.pyentrypoint. The prior audit suite and symlink write-containment regression remain retained.Final corrective head:
d307158bd37a6dcefc16cd781d587b3fe44ba622.Validation on that head:
catalog-integrityrun 35439415337 — successtestrun 35439415302 — success; 53 testslean-formalrun 35439415297 — successmain; merge base equals currentmainmainv1.0.0still resolves to41e2fc3677469839fb298dedefd0ce72caebcc68This is intended as the final bounded validator-correction pass. Parser consolidation/replacement remains explicitly out of scope for this PR.