Skip to content

3.x.x: measure accepted-block revision work delivery - #475

Merged
djh58 merged 14 commits into
3.x.xfrom
djh58/prism-b458-landing-metrics
Sep 21, 2026
Merged

djh58 merged 14 commits into
3.x.xfrom
djh58/prism-b458-landing-metrics

Conversation

@djh58

@djh58 djh58 commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Refs #458.

Records this frontend's definitive node acceptance or active-chain proof through the real offer path until its first successful mining.notify write carrying compatible post-landing work. All three histogram results (published, degraded, superseded) end at delivery; prepared work or a newer revision alone cannot finish the interval. The oldest pending age survives a second acceptance, failed refresh, and supersession, while actual existing build deadline hits increment once.

Tracking is bounded and process-local, with mature-height retirement and explicit restart boundaries. A separate unlabeled tracking-unknown gauge preserves lost-evidence and saturation warnings while the oldest known pending age remains visible; an unknown interval cannot hide another measured stall. Lost revision/delivery ordering evidence suppresses terminal samples, and proven orphans close their wait without a delivery histogram while retaining deduplication. No peer acceptance timestamp is inferred. With no connected miner, a known deliverable interval remains pending even when work is prepared. Ordinary settlement, operator recovery and reconciliation observe the existing COMMIT boundary and exact committed revision without adding accounting writes, transactions, locks, deadlines or authority changes; first-confirmation evidence is retained independently of observer arrival order.

Durable orphan handling also crosses frontend boundaries: the existing ten-second metrics collector reads terminal outbox state for at most 4,096 locally unresolved identities, under its existing three-second total deadline and read-only snapshot, skipping the extra SELECT when empty. A shared ledger observer marks in-flight/lost/cancelled orphan COMMIT outcomes uncertain; acknowledged success or positive durable evidence closes the wait without a delivery sample and retains its tombstone. Negative, failed, cancelled or stale reads cannot fabricate success. This adds no work-publication dependency or accounting mutation.

Adds three alert definitions: pending warning above one second, pending critical at the provisional 307-second incident floor, and timeout-counter increase. All have zero added dwell. The critical floor is incident duration, not evidence of early warning; thresholds need measurement in #291. This PR does not deploy alerts.

Validation for published head 9b03ffa53acc085777fb9424ea019bd8cc7f0321, incorporating 3.x.x at 2e81ca3c502a071c428bfd8a593f87e0454da3aa: the integrated production tree passed 608 Rust tests (516 library, 34 landing/support including 16 live landing cases, 8 lost-race, 17 observability, 5 RPC-deadline and 28 Stratum); three pre-existing tests remain ignored. Subsequent test-only lint cleanup was rechecked with all 19 landing unit tests, all 34 landing integration/support tests and all-target Clippy with warnings denied. All 16 required landing gates executed against real PostgreSQL 16, a fake node and actual sockets. The peer-orphan, lost-COMMIT and cancelled-COMMIT cases failed before repair and pass after it. Formatting, 13 gate-validator tests, 96 deleted-test-map/shard tests, and the live deleted-test-map owner check passed. The final docs/validator-only base merge preserved the two landing rows as partial and corrected their triage index; no validator was weakened. Fresh-head CI passed all 20 jobs on 9b03ffa53acc085777fb9424ea019bd8cc7f0321.

The metric/alert definitions are unchanged by this follow-up: the census remains 51 families /214 startup /312 populated, with four added families /48 series versus the original baseline and no identity labels. The earlier qualification at 14d2430 passed 177 PromQL expression assertions, 117 alert assertions and 10 deployment combinations; those unchanged tests were not rerun for this orphan repair. Full workspace and release-profile allocation tests were not run locally. Adjacent #470 remains separate and needs a combined census at integration.

Issue checklist:

  • Unconditional exactly one sample per accepted block/frontend: normal, reordered and superseded observable paths are tested, but the documented restart/lost-evidence/saturation limits require independent review against the original wording.
  • Oldest pending age rises during withheld delivery and failed templates; second acceptance does not reset it; successful qualifying delivery clears it.
  • Actual build deadlines count once; successful builds, cancellation, ordinary failures and node-offer timeouts do not count.
  • Three concrete alert rules, five migrated rows, PromQL tests and generated deployment patch.
  • Registry, metadata and two-way generated inventory.
  • Cardinality/privacy census for the four additions.
  • Both deleted-test map rows name native tests and remain honestly partial.
  • Linked production-signal comment on #275 and incident-coverage comment on #291.

Follow-up review disposition: Sol verified the prior settlement/recovery, mixed-age and saturation fixes, then identified the peer-orphan and uncertain orphan-COMMIT gaps now repaired in a4e0337735dc04a9cbbe6afdf0ca6f0b9f7d4c2f. Both are author-qualified, and Sol's completed independent final delta review found no refutation on 9b03ffa53acc085777fb9424ea019bd8cc7f0321 after independently passing all 19 landing unit tests and three real PostgreSQL orphan controls; the public ledger records the evidence and limits. Cursor delta verification completed on 9b03ffa53acc085777fb9424ea019bd8cc7f0321 with no new issues after one request. The independent database invocation that skipped its bodies was excluded from evidence; the three credited cases were rerun with required integration enabled. That review did not measure a live multi-frontend deployment, sustained collector latency or cross-restart identity. Fable remains provider-blocked/incomplete, not passed, and its safeguard was not bypassed; the full review battery is not claimed complete. No merge or deployment is requested.

@blacksmith-sh

This comment has been minimized.

@djh58 djh58 changed the title v3.0.0 feat: measure accepted-block revision work delivery 3.x.x: measure accepted-block revision work delivery Sep 21, 2026
@djh58

djh58 commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

@cursor review

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@djh58

djh58 commented Sep 21, 2026 •

Copy link
Copy Markdown
Member Author

Follow-up orphan repair is published and author-qualified at 9b03ffa53acc085777fb9424ea019bd8cc7f0321; fresh-head CI and Cursor verification passed, and Sol's completed independent final delta review found no refutation on that exact head. This records the completed author repair and independent delta disposition; it is not full-battery or merge approval.

Finding Current disposition
Peer B commits a terminal orphan while accepting frontend A keeps a permanent wait Fixed in a4e0337735dc04a9cbbe6afdf0ca6f0b9f7d4c2f: the existing collector performs one read-only lookup for at most 4,096 unresolved local identities, with its existing three-second total deadline and ten-second cadence; empty tracking skips the query. The real two-frontend regression failed before repair and now closes A without a histogram, including duplicate evidence and later active-chain reactivation.
Orphan COMMIT loses its reply or is cancelled Fixed at the shared existing ledger COMMIT boundary in the same commit. The interval remains explicitly uncertain until acknowledged success or positive durable terminal evidence; no retry or current-revision guess fabricates a delivery. Both real PostgreSQL wire-fault regressions failed before repair and now pass.
Failed, cancelled or reordered terminal evidence collection Real pool-failure/cancellation controls preserve the wait with an independent unknown signal; unit controls prove stale completion cannot erase newer failure, negative evidence cannot upgrade an uncertain orphan, and the identity payload remains bounded.
Previous settlement/recovery ownership, mixed unknown/known age and capacity-ordering findings Sol's final delta review verified these original repairs within the documented local horizon; their regression controls remain passing.

The integrated production tree passed 608 Rust tests, with three pre-existing ignores. Final test-only lint cleanup passed all 19 landing unit tests, all 34 landing integration/support tests and all-target Clippy. All 16 landing gate sites executed. Both upstream base changes are incorporated: PR476 at 0f4d034d8cc8d8d2b94b42234b108cd54099ead4, and PR455 at 2e81ca3c502a071c428bfd8a593f87e0454da3aa. All 96 validator/shard unit tests and the live deleted-test-map owner check passed; the landing rows stay partial with the unmet horizon claim owned by open #458, and their obsolete triage-index entries were removed without weakening the validator.

Fresh-head CI passed all 20 jobs on 9b03ffa53acc085777fb9424ea019bd8cc7f0321, including all PostgreSQL shards and gate aggregation. Cursor delta verification completed on that same head with no new issues; the two original threads remain resolved. The earlier green results at 14d2430 are not substituted for this head. Fable remains provider-blocked/incomplete, not passed; no alternate prompt/model or duplicate lane bypassed the safeguard. Sol independently verified the pinned full-diff SHA256 4e923f506f9c43122797b8702712eef17d8dde40e81fce5046a1c7153ef84d5b and passed all 19 landing unit tests plus three real PostgreSQL orphan controls with required integration enabled. The initial database invocation that skipped its bodies was excluded from evidence. The peer terminal-orphan and uncertain-COMMIT findings are closed within the documented process-local horizon; completion ordering and the bounded collector budget also withstood review. A live multi-frontend deployment, sustained collector latency and cross-restart identity were not measured. The full review battery is not claimed complete.

The unconditional exactly-once checkbox remains open across restart, unavailable evidence and bounded tracking. The accepting frontend learns a peer's terminal disposition on successful collection; this does not claim the peer's commit time as a locally observed event. No accounting writes, payout decisions, lock order, original deadlines, identity labels or Stratum delivery boundary changed. The existing metric and alert definitions remain unchanged by this repair, thresholds still require operational measurement, and no merge or deployment occurred. Repeated observer lock/scan cost remains an unmeasured performance concern.

@djh58

djh58 commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

@cursor review

Please verify the delta from 6bf53945957d4fa1fc335ed22a9d9cb4893c9039 to 14d24309a9d7a2ed5b008809dd50d848586ffadc, including both original findings, first-confirmation ownership, committed orphan retirement, bounded ordering evidence and mixed unknown/known pending ages. The four signed fixes passed the documented local qualification; fresh-head CI is running.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@djh58

djh58 commented Sep 21, 2026

Copy link
Copy Markdown
Member Author

@cursor review

Please verify the follow-up delta through 9b03ffa53acc085777fb9424ea019bd8cc7f0321, particularly peer-settled terminal orphans, lost/cancelled orphan COMMIT replies, and bounded/stale/cancelled terminal evidence collection. The orphan repair is a4e0337735dc04a9cbbe6afdf0ca6f0b9f7d4c2f; 63de5e51f2b6046f04000b29aba053bb2419c53a only cleans up its test lint. The branch incorporates current 3.x.x at 2e81ca3c502a071c428bfd8a593f87e0454da3aa, with truthful partial landing coverage retained in the deleted-test map. Local regressions pass and fresh-head CI is running; this request is verification, not final approval.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 9b03ffa. Configure here.

@djh58
djh58 merged commit 7089a17 into 3.x.x Sep 21, 2026
22 checks passed
kiwidream added a commit that referenced this pull request Sep 22, 2026
The rebase onto 9b6caed resolved the census, metadata, scenario and
generated-document conflicts against #475's landing families; this commit
repairs the two fixtures the resolution left malformed and regenerates the
metric inventory, migration table and qbit-tools patch on the rebased tree.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
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