Skip to content

spec(t27os): labs.t27 -- the SETTLE run-state law, the sequence pin, step_name() (Closes #11858) - #11918

Merged
gHashTag merged 1 commit into
masterfrom
lane/t27os-settle-bridge
Oct 23, 2026
Merged

gHashTag merged 1 commit into
masterfrom
lane/t27os-settle-bridge

Conversation

@gHashTag

Copy link
Copy Markdown
Collaborator

The SETTLE step's run-state law on top of #11861's wiring: settle_run_state(BridgeAnswer) -> u8 — RUN_OK iff PAY_NORMAL and verified; everything else RUN_FAILED (refusals, coordinator slashes, credited-but-unverified jobs — the ledger's OUT_* alone never decides). The actor reads only the BridgeAnswer.

Plus the honest hardening: the sequence pin covers all ten names in order, STEP_FETCH < STEP_PUBLISH < STEP_SETTLE, STEP_SETTLE + 1 == STEP_COUNT, STEP_NAMES.len == 84; step_name() rewritten from a stub (it named no step) to the per-step pattern.

The self-caught defect: the first STEP_NAMES.len pin asserted 82 (miscounted build-t27c/build-t27b as 9 bytes; they are 10) — the test failed and caught it, fixed to 84. The pin working as designed.

10/10 tests, 0 FAIL, 0 vacuous; sealed (spec_hash sha256:859ec30c…, all hashes MATCH). Imports: SB_REFUSE_VERIFICATIONS, V_WRONG_RESULT, PAY_SLASH_ONLY. NOT CLAIMED: no mTRI moved, the amounts are the payout law's, the receipt signing is t27c corpus-receipt's.

phi^2 + 1/phi^2 = 3 | TRINITY

…ate maps BridgeAnswer to RUN_OK/RUN_FAILED, the sequence pin covers all ten names in order, step_name() lands per-step (Closes #11858, refs #11789, #11861)
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-23 23:10:34 UTC

Summary

Status Count
Total Open PRs 43
PRs with Failing Checks 38
PRs with All Checks Green 5
READY 4
FAILING 38
PENDING 0
NO CHECKS YET 0

These columns do not partition: 4 + 38 + 0 + 0 = 42, and there are 43 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=5aec047d42ec != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@tri-claw

tri-claw Bot commented Oct 23, 2026

Copy link
Copy Markdown

Summary by t27-bees

Checked by the t27 compiler

t27c parse, parse-complete and typecheck on each changed .t27 file at e9c0192. Nothing was generated, built or run. A pass means the file is well formed, not that it is right.

  • specs/t27os/labs.t27: parses and typechecks.

Read by the model

The PR implements the SETTLE step's run-state law (settle_run_state) mapping BridgeAnswer to RUN_OK only on PAY_NORMAL + verified, else RUN_FAILED. It also hardens the step sequence pin: step_name() is rewritten to return per-step names (fixing a stub that returned the joined list for every step), and the test now asserts all ten names in order, ordering constraints (STEP_FETCH < STEP_PUBLISH < STEP_SETTLE, STEP_SETTLE + 1 == STEP_COUNT), and STEP_NAMES.len == 84 (the prior pin asserted 82 and the test caught the miscount).

Worth a look

  • specs/t27os/labs.t27:75–92 — step_name() now returns individual step names instead of the joined STEP_NAMES string. Any downstream code that relied on the old behavior (receiving the full comma-separated list for any valid step) will break. The change is intentional but not backward-compatible.
  • specs/t27os/labs.t27:158–166 — settle_run_state() decides RUN_OK solely on a.pay == PAY_NORMAL and a.verified. If BridgeAnswer gains additional fields that should affect run state (e.g., a distinct refusal code that warrants a different actor response), this function will not see them.
  • specs/t27os/labs.t27:168–210 — settle_run_state_law_holds() constructs a Ledger via register_node(ledger_init(default_policy()), 1505, 6774813, true, 5000). If the ledger initialization parameters or the policy change, the invariant's assumptions about PAY_NORMAL/PAY_SLASH_ONLY/OUT_CREDITED outcomes could shift without the test detecting it (the test uses the same constants, so it would still pass, but the mapping might no longer reflect the real payout law).
  • specs/t27os/labs.t27:220–236 — step_names_are_ten asserts STEP_NAMES.len == 84 based on a manual byte count (75 name bytes + 9 commas). If STEP_NAMES is defined elsewhere and edited without updating this test, the pin will catch it — but the test and the constant must be edited together, which is a maintenance coupling.
  • specs/t27os/labs.t27:252–284 — settle_run_state_maps_the_bridge_answer duplicates the four cases from the invariant as a runtime test. This is a deliberate defense against vacuous compile-time proofs (T730), but it means the same logic lives in two places; a change to the mapping law requires updating both the invariant and this test.

Read: 2 files, +147 -20, the whole diff. Head e9c0192. Model: openai-compatible/nvidia/nemotron-3-ultra-550b-a55b. Commands: @t27-bees review | summary | help | pause | resume. Free for every repository.

@gHashTag
gHashTag merged commit a7fa547 into master Oct 23, 2026
25 of 29 checks passed
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