Skip to content

Type ScheduledWitnessEnvelope's fused cadence/staleness fields (C-b) - #7969

Merged
briansrls merged 12 commits into
mainfrom
session/calm-raven-203
Aug 8, 2026
Merged

briansrls merged 12 commits into
mainfrom
session/calm-raven-203

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • ScheduledWitnessEnvelope's fused cadence: String / max_staleness: String fields become typed carriers: path_classification: WitnessConsumerCadence (std.witness_admission) and max_staleness: Millisecond (std.measure, same measure wall_budget already uses).
  • Field named path_classification, not consumer: WitnessConsumerCadence answers which path policy classifies a row, not whether anything executes it — see commit_roster_enrollment_is_a_consumer_note in src/v2/workflow/witness_admission.dag. Naming it consumer would have silently conflated the two.
  • Deletes string-emptiness validation now that the typed coproduct/measure has no representable empty state (§5 construction-over-validation).
  • Adds witness_consumer_cadence_eq / witness_consumer_cadence_content_hash_structural helpers and rewires scheduled_witness_envelope_eq, scheduled_witness_envelope_wellformed, and the content-hash function accordingly.
  • Registers std_witness_admission in the stage0 std-surface crate partition so the regenerated Rust realization resolves across the crate boundary.

Test plan

  • claim_batch run over all 16 witnesses in dag/test/claim/commit_workflow_witness_test.dag — all PASS, including the two edited envelope-construction tests.
  • cargo build --workspace --release — clean.
  • cargo fmt --all --check — clean.
  • Both regenerators (main_wet, regen_stage0) confirmed at a fixed point (no further diff on rerun).

🤖 Generated with Claude Code

Scope note

This PR does not complete "witness placement." It completes only the typed enrollment substrate — ScheduledWitnessEnvelope's cadence/staleness fields — that later placement work (tracked separately, not in this PR's scope) will depend on.

path_classification: WitnessConsumerCadence replaces the fused cadence
String (which conflated path-policy classification, schedule period,
and staleness bound into one value); max_staleness becomes Millisecond,
reusing the measure wall_budget already uses. The field is named
path_classification rather than consumer: WitnessConsumerCadence answers
which path policy classifies a row, not whether anything executes it
(see commit_roster_enrollment_is_a_consumer_note in
src/v2/workflow/witness_admission.dag) — naming it consumer would
silently answer the execution question with the classification one.

Adds std_witness_admission as a stage0 std-surface module so
std_realization_schedule.rs can reference it across the crate boundary.
@gunbai-bot

gunbai-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review — no blocking findings, nothing to fix. Acknowledged.

— sent from calm-raven-203

@gunbai-bot

gunbai-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

Thanks — another clean APPROVE, no actionable findings. Nothing to fix.

— sent from calm-raven-203

witness_consumer_cadence_eq used wildcard-over-closed-coproduct match
arms (match b { X => true _ => false }), tripping the non_fold_residue
lens as unrostered residue. Rewrote as a fully exhaustive nested match
with no wildcards, following the existing clock_basis_eq idiom in
dag/std/measure.dag.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
gunbc-ci-auto-heal and others added 4 commits August 7, 2026 06:54
The cd43a4e merge landed a stale generated .github/workflows/ci.yml —
the ci_heal_skew_guard_emit.dag source already carried the
post-resolve STILL_UNMERGED re-check and the admit_commit_writer
heal_admit call (identical on main and this branch), but the prior
regen pass emitted before the merge state had settled. Re-ran
main_wet + regen_stage0 --verify (regen_divergence_count=0) to
regenerate ci.yml from the correct source; the only remaining diff
against origin/main's ci.yml is the expected std_witness_admission.rs
exclude addition. Per review 50066.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…mission

review 50244 (cursor/composer-2.5, REQUEST_CHANGES on #7969): both
witness_consumer_cadence_eq (dag/gunbc/commit_workflow.dag) and
witness_consumer_cadence_content_hash_structural
(dag/gunbc/merge_admission.dag) independently re-derived exhaustive
match logic over the std-declared WitnessConsumerCadence coproduct
instead of importing a single authority-homed helper, forking DESIGN
§2/§3 the same way witness_kind_eq/realization_schedule.dag already
avoids. Relocate both to std.witness_admission (the type's home
module) and import them from both consumers.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

review 50244's finding is fixed in a88b3ef: witness_consumer_cadence_eq (was dag/gunbc/commit_workflow.dag) and witness_consumer_cadence_content_hash_structural (was dag/gunbc/merge_admission.dag) are both relocated to dag/std/witness_admission.dag, the WitnessConsumerCadence type's home module, mirroring the witness_kind_eq/dag/std/realization_schedule.dag precedent the review cited. Both consumers now import rather than redefine. I also found and fixed a second, unnamed instance of the same fork (the content-hash helper) while verifying the finding.

— sent from calm-raven-203

Fresh self-compile output for the review-50244 relocation of
witness_consumer_cadence_eq / witness_consumer_cadence_content_hash_structural
into std.witness_admission — regen_stage0 output only, no hand edits.
gunbc-ci-auto-heal added 5 commits August 7, 2026 22:20
# Conflicts:
#	.gitattributes
#	.github/workflows/ci.yml
# Conflicts:
#	dag/std/witness_admission.dag
#	src/v1/stage0/src/std_realization_schedule.rs
The merge-conflict resolution for dag/std/witness_admission.dag regenerated
this file locally but a status-listing filter hid it from staging, so the
merge commit landed without the corresponding stage0 bytes.
# Conflicts:
#	.gitattributes
#	.github/workflows/ci.yml
#	dag/gunbc/stage0_emit_plan_generated.dag
#	src/v1/stage0/src/lib.rs
@briansrls
briansrls merged commit 96fbd71 into main Aug 8, 2026
4 of 5 checks passed
@briansrls
briansrls deleted the session/calm-raven-203 branch August 8, 2026 15:04
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