Define uncached primary and junction schema lookup - #34
Merged
Merged
Conversation
alexstandiford
changed the base branch from
codex/scoped-database-query-v2
to
release/2.2
September 20, 2026 12:15
alexstandiford
marked this pull request as ready for review
September 20, 2026 12:15
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Add uncached primary and junction schema lookups while preserving the cached APIs. Implemented at 71b5362, stacked on Operation-local query boundary, PR 33.
A cold metadata lookup can publish a cache-miss event and write shared cache inside a coordinated callback. The query adapter needs the same metadata rules without those effects.
PHPNomad architecture: Uncached primary schema lookup (Source 9814) defines the contract within Discovery: Siren CRM core (Source 9721).
Contract
Three uncached TableSchemaService helpers preserve primary Column objects, declaration order, array shape, exactly-one-column validation, junction naming, and original descriptor failures. Each call reads current descriptor metadata without CacheableService or storage access.
JunctionTable uses these helpers for its left, right, and foreign-key lookups. Names, column types, index order, references, identity fields, and nested compound-key refusal stay compatible.
Custom descriptors must provide stable, side-effect-free metadata during coordination. Caller-owned operation boundaries report terminal failures. The helpers preserve the original failure without adding duplicate operation logs.
Verification
The production suite passes 143 tests and 369 assertions, with no skipped or incomplete cases. The unit contract passes 32 tests and 94 assertions. The real schema-service and junction wiring contract passes six tests and 24 assertions. Both acceptance files pass level-nine analysis, syntax, and diff checks.
PHPNomad proof: Uncached primary and junction schema contracts (Source 9836) and PHPNomad proof: Schema descriptor failure supplement (Source 9840) retain conforming runs, per-guard deliberate defects, and clean disposable-clone restoration. The independent integration reviewer has cleared the supplement.
All 14 architecture lenses and all 14 final independent production-review lenses pass. Every finding is closed. The implementation and proof retrospective is in Schema helpers are implemented, and query binding exposed a global connection path (Journal 18598).
Production-inclusive focused analysis retains four inherited TableSchemaService findings and eight inherited JunctionTable findings. Full package level-nine analysis retains 231 inherited findings. Formatting and unchanged README spelling baselines remain open, with no suppression. Current-head GitHub test jobs pass.
Remaining proof
The following adapter must exercise a cold ordinary-table insert and built-in junction operation through the real coordinated query strategy. Commit and callback-failure rollback variants must observe real cache and event boundaries and prove zero publication during the callback.
A descriptor failure must reach the operation owner unchanged, with exactly one privacy-safe log, including when logging throws. Direct metadata calls do not establish those adapter guarantees.
Application binding, business-flow proof, full CI, UAT, and dependency publication remain open. This draft has no composite score or merge eligibility. No pull request has been merged, released, or deployed.