Repository navigation
fix(v5): reject duplicate keys in power-plan JSON specs - #328
TheHalfMoon wants to merge 10 commits into
Conversation
Signed-off-by: Gocceri <azialshehri@gmail.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Exact-head Linux qualification — 2026-10-10GitHub Actions run #38033628810 COMPLETED SUCCESS on this PR's exact pushed source commit The Mac test evidence predating this CI was full repository 1,430 passed +264 subtests, V5 specialized 378 passed +86 subtests, planner focused 66 passed, original frozen source-binding audit 307/307 PASS. The added JSON contract has no model/GPU/API/PHI/confirmatory work. Still blocked: PR is DRAFT/UNMERGED, GitHub reports this commit |
Signed-off-by: Gocceri <azialshehri@gmail.com>
2026-10-10 — Confirmed evidence overwrite vulnerability fixed, exact head
|
Exact-head GitHub Actions verification — 2026-10-10The formerly queued job has now COMPLETED SUCCESS: run #38039360084, matching PR #328's new exact source HEAD This Linux pass covers the new destination no-overwrite regressions in addition to the existing strict JSON-input controls. Corresponding Mac qualification on this exact source: 1,434 full repository tests PASS +264 subtests; 382 V5 tests PASS +86 subtests; 70 planner tests PASS; 307/307 original frozen source bindings PASS. Commit was pushed normally with DCO signoff; Only engineering input/evidence integrity qualified: formal independent code/scientific review remains absent, the commit is not reported as GitHub cryptographically verified, and statistical-family completeness, source×training-seed uncertainty, true 90% power, merge/confirmatory and publication authorization remain NO-GO, tracked under #326. This PR remains DRAFT/UNMERGED. |
Reject a positive paired source-case SD whose normal-approximation MDE rounds to exact zero. Keep the zero-noise branch distinct and add build-plan and CLI negative regressions without creating misleading evidence or changing final scientific authority. Signed-off-by: Gocceri <azialshehri@gmail.com>
2026-10-10 — Numeric underflow fail-closed qualification (existing DRAFT PR #328)Exact new head: Reproduced real implementation defect: Scoped repair: refuse the exact-zero computed MDE when Real verification on authorized macOS only: 72/72 focused power-plan tests pass, 1,436 full pytest tests plus 264 subtests pass; Python compile and whitespace scope checks pass; only Real GitHub exact-head CI: workflow run #38075610248 at Review boundaries: Alibaba Open Code Review v1.12.13 preview identified one source file eligible for model review and excluded tests by default; this was preview only, not a completed independent provider-backed OCR verdict. The commit has a locally verified ED25519 Git signature and author-matching DCO, but GitHub reports |
Guard even unreferenced descriptive metric margins against finite-input overflow, assert CLI produces no artifact on rejection, and pin immutable CI checkout action. This does not qualify Holm, 90% power or confirmatory execution. Signed-off-by: Gocceri <azialshehri@gmail.com>
2026-10-10 — overflow-safe unreviewed planning margins, exact-head CI (DRAFT)New exact head: Reproduced concrete bug on previous head: Correction: both Workstation evidence (Mac only): 74 focused planner tests PASS; entire repository 1,438 PASS + 264 subtests PASS; Python compile, YAML parse, read-only GitHub Actions permissions, diff whitespace/scope checks PASS. The workflow checkout action was pinned to previously used immutable Real GitHub-hosted CI: run #38076455024 is COMPLETED SUCCESS at exact head Still NOT qualified: unreviewed caller-supplied primary Holm non-target family; source-case/calculator/seed nuisance; full 90% power at 4096 cases; independent scientific/statistical/code/security review; confirmatory/reserve execution; publication/clinical readiness. Locally verified SSH signing plus matching DCO are not GitHub signature verification: GitHub reports |
Reject padded metric names even when unreferenced to prevent ambiguous duplicate descriptive rows. Keep caller-supplied family unreviewed and all scientific approval flags false. Add targeted alias regressions. Signed-off-by: Gocceri <azialshehri@gmail.com>
2026-10-10 — reject whitespace-aliased unreviewed planning metric keys (DRAFT; not scientific approval)Exact reviewed code head: Reproducible source-input defect before the patch: Conservative contract repair: before planning, metric-map keys must be nonempty string keys with no leading or trailing whitespace. No metric trimming or auto-renaming is performed; invalid caller-supplied aliases fail closed. Added parametrized regressions for Real Mac evidence: 77/77 focused planner tests PASS, 1,441/1,441 full repository tests PASS plus 264 passing subtests; Python byte-compilation and git whitespace checks PASS. A deterministic pre-change test reproduced acceptance of the padded duplicate key. Additional finite/subnormal/overflow input sweep showed only accepted finite representable results or controlled contract errors for the sample grid; this is not exhaustive proof. Only the existing planner script and tests were changed. Existing dirty worktrees were not touched. Real exact-head GitHub CI: run #38077964874 COMPLETED SUCCESS for exact head All gates remain open: GitHub marks the Mac's locally valid and DCO-matching SSH signature as |
Map oversized integer and deeply nested JSON decoder failures to invalid input without masking duplicate-key or nonstandard-constant rejections. Add direct CLI regressions ensuring no output evidence is created. Keep all scientific gates closed. Signed-off-by: Gocceri <azialshehri@gmail.com>
2026-10-10 — robust, fail-closed JSON parser resource-limit handling (DRAFT ONLY)Exact head: Reproduced technical defect on prior head: while Conservative repair: preserve explicit Real tests on authorized Mac: 79 focused planner tests PASS; 1,443 full-repo pytest tests PASS and 264 subtests PASS; Python compilation and exact-diff whitespace checks PASS. Existing 307 frozen files and other uncommitted Mac worktrees untouched. Real GitHub exact-head CI: run #38078495805 COMPLETED SUCCESS at SHA Outstanding gates: the normal DCO-signoff commit carries a locally verified SSH signature, but GitHub still reports |
Integrate exact-head model-free PR327 power contracts and PR325 statistical reviewer packet into the strict JSON input branch. Preserve 307 frozen evidence files and every unreviewed family, crossed-nuisance, power and confirmatory authorization boundary. Signed-off-by: Gocceri <azialshehri@gmail.com>
2026-10-11 — reconcile strict-JSON PR with the full evidence and power-planner chainExact new PR head: Real Mac qualification: conflict-free Scientific/governance boundary: all outputs remain development-only; no complete independently reviewed primary Holm family, prospective crossed source-case/calculator/seed variance, validated each-primary-effect 90% power at 4096 cases, source/provenance rights signoff, clinical/publication or confirmatory access. GitHub reports |
…dence Write development-only power plans through same-directory synced temporary files, publish completed bytes by no-clobber hard link, and clean up on write, sync and publication failures. Synthetic regressions guard failure injection, race collisions and existing evidence while preserving all scientific authority restrictions. Signed-off-by: Gocceri <azialshehri@gmail.com>
2026-10-11 — complete and no-clobber publication of development-only JSONExact new head: Concrete defect addressed: original exclusive Fail-closed correction: encode the finished payload and write it to a same-directory unique Real authorized Mac evidence: injected synthetic partial-write failure after successful half-write, fsync failure and publication hardlink failure all reject without output or temp residue; successful publication yields exact serialized bytes and collision preserves bytes. All 83 focused planner tests PASS; 1,475 full-repository tests + 264 subtests PASS; 307-entry original source audit and 72-cell statistical packet source replay PASS; py_compile and exact 3-file diff checks PASS. Alibaba OCR local preview only reports the planner as eligible, not an actual provider-backed independent review. Jev auxiliary check is not external code/scientific review. Hosted CI: exact-PR-head run #38163417388 triggered at Unchanged research gates: primary complete Holm family/size remains unreviewed, three-seed × calculator × source-case dependence and 90% power at N=4096 unqualified, independent science/rights/security signoff lacking, and confirmatory/reserve/clinical/publication/merge authority false. Remain DRAFT/OPEN, Issue #326 OPEN. |
2026-10-11 — exact-head CI completion confirmationThe previously queued run #38163417388 has now COMPLETED SUCCESS at exact PR #328 head PR #327 Mac checkout was separately fast-forward synchronized to The CI pass verifies software mechanics only; GitHub signature still reads |
Converge strict development power-planning implementation with exact upstream PR327 and PR325 source-bound 56-slot nomination inventory without asserting a reviewed Holm family or statistical power. Signed-off-by: Gocceri <azialshehri@gmail.com>
2026-10-11 — complete source-bound candidate coverage integrated into strict output contractExact PR head: Mac real tests on complete stacked branch: 106 focused tests, 1,483 full-repo tests + 264 subtests PASS. Source-bound model-free original evidence checks and all 56 undeclared reviewer slots regenerated identically. Hosted exact-head CI #38165895691 COMPLETED SUCCESS. New reviewer slots are explicitly NOT a 56-test Holm family: all primary/family/seed-nuisance/90%-power/confirmatory/publishing authorization fields remain false or null, with 307 frozen original science inputs untouched. Mac ED25519 locally verified GitHub still |
…ication Normal merge of current PR327 and PR325 model-free evidence writer into strict input branch. Keep original frozen science and all Holm, 90-percent power and confirmatory authority gates unchanged. Signed-off-by: Gocceri <azialshehri@gmail.com>
2026-10-11 — current strict-JSON branch now includes complete atomic development evidence publishingExact head: Real Mac qualification on full combined stack: 113 focused tests PASS; 1,490 full-repository tests + 264 subtests PASS; source-bound 72-cell packet and 56-slot candidate review registry deterministic replays PASS; all 307 original frozen research files unchanged. No research runs, source-case generation, paid APIs, model weights, claim promotion, rebase, forced push or merge to main. Hosted CI: exact-head run 38169616129 was queued when checked; do not mark it as completed absent result. The author signed locally with DCO, but GitHub signing remains |
Scope — fail closed on ambiguous JSON at the V5 development planning boundary
This DRAFT PR is deliberately stacked on PR #327 (base
fix/v5-power-planner-contract-hardening) to isolate a reproduced review finding reported on #327 while its existing Mac checkout is concurrently dirty with someone else's uncommitted numeric-overflow improvements. Nothing from that other worktree was reset, staged, committed, discarded or modified.Original issue: Python
json.loadsaccepted multiple identical object keys with silent last-wins behavior in the caller-provided V5 planning spec. A synthetic input with three occurrences ofprimary_non_target_family_size(original4, then conflicting1, then4) returned exit code 0 andPASS_DEVELOPMENT_ONLY_INPUT_CONTRACT. This is a source-review/provenance ambiguity, not proof that the scientific power gate was bypassed; authority flags correctly remained false.Changes
PowerPlanContractError, instead of silently normalizing contradictory inputs.NaNandInfinity, malformed JSON/invalid encoding and non-object root specs before any plan can be written.false.Model-free qualification and review limits
Mac results at source commit
61231565e3bf79770b79eef334f4225cbf28c05d:CI should run the existing exact-head read-only V5 planning-input contract workflow, which already includes this test file. Please record its actual outcome at this head before any promotion.
Scientific/governance hold: Caller-supplied hypothesis family completeness, source-case × stochastic-training-seed covariance, legitimate 90% power at frozen Holm alpha .05/N4096, independent qualified statistical review, cryptographic commit signing, founder approval and confirmatory/reserve authorization all remain OPEN in #326. This fixes only JSON parsing ambiguity. No new model inference, GPU/Kaggle, PHI, paid API or confirmatory/reserve identity materialization, and no claim of clinical readiness, paper publication or final project completion. DCO sign-off alone is not cryptographic signing.
The PR remains DRAFT/UNMERGED. Use normal merge commits only if and when all governance gates have been satisfied; do not force-push/rebase or merge just because CI is green.
Summary by cubic
Fixes the V5 power planner failing closed on ambiguous or degenerate JSON specs so conflicting caller-supplied inputs no longer silently pass, and prevents the CLI from overwriting evidence through its output path. Also aligns the strict-input branch with the exact-head power contracts from PR #327 and the PR #325 statistical reviewer packet while preserving all scientific and confirmatory authority gates.
Python's
json.loadspreviously accepted duplicate keys with last-wins behavior, nonstandardNaN/Infinityliterals, and non-object roots. The planner now rejects all of these with explicitPowerPlanContractErrorfailures and produces no plan output. Oversized integers and deeply nested JSON that hit decoder resource limits are also normalized to contract errors. Whitespace-padded metric names are rejected as aliases even when unreferenced. Output files are now created in exclusive mode, so writing over the input source, an existing artifact, or a symlink fails withOUTPUT_ALREADY_EXISTSinstead of clobbering evidence. Positive paired SDs whose normal-approximation MDE underflows to exact zero are rejected, and descriptive-metric margins that overflow 2x repeatability are rejected even when unused.NaN/Infinity, root type, syntax errors, oversized integers, deep nesting, subnormal SD, margin overflow, and padded metric-name aliases.Written for commit 220723e. Summary will update on new commits.