Skip to content

spec(t27os,queen): next_step feed observation, an idle edge asks a check, no decisions or launches (Refs #12884) - #13091

Merged
cursor[bot] merged 15 commits into
masterfrom
lane/next-step-feed-12884
Nov 9, 2026
Merged

cursor[bot] merged 15 commits into
masterfrom
lane/next-step-feed-12884

Conversation

@gHashTag

@gHashTag gHashTag commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

Refs #12884

What this adds

An observation adapter for the event-driven loop. specs/t27os/pane_feed.t27 parses the text pane-table snapshots that T27OS_CTL=list prints. specs/t27os/next_step_main.t27 (an @extern host file, tested with t27b) runs it with NS_MODE=feed. An idle edge asks one extra check (FEED_QUIET). Nothing else triggers it, and the feed never calls decide and never launches anything. The run ends with checks_asked=N decisions=0 launches=0.

The decide and attempt contracts the bridge calls are specs/queen/next_step.t27 and specs/queen/next_step_run.t27. The contract describes deduplication, fences, replay and the effect journal; the runtime behaviour is not measured.

Evidence

All runs were in a T27 OS shell cell under the load gate.

Pure tests

  • pane_feed: 13/13, and t27c test-report shows 13, FAIL 0, vacuous 0.
  • next_step_main: 6/6.
  • next_step: 14/14.
  • next_step_run: 11/11.

Negative controls. Each is a copy with one mutation, and each fails:

Spec Mutation Failing test Result
pane_feed feed_signal returns EV_WORKER_IDLE instead of FEED_QUIET an_idle_edge_asks_a_check_and_decides_nothing 12/1
pane_feed ends_named dropped from autonomy_gates one_stage1_fix_keeps_autonomy_closed 12/1
next_step_main report_names_spec forced to true the_artifact_must_name_the_spec 5/1
next_step_run the NR_ATTEMPTED guard removed three tests 3 FAIL
next_step the dedup removed repeat_assigns_once, wait_and_other_answers 12/2

Replay of byte copies of four real snapshots. The copies are in tests/fixtures/next_step_feed/:

  • s1 is the base.
  • s2 is an idle edge.
  • s3 duplicates s2.
  • s4 is an older copy of s1.

The run ended with feed end snapshots=4 checks_asked=1 decisions=0 launches=0, rc 0. This confirms only that an idle edge asks for a check and does not call decide. It does not check live autonomous work: it was one binary, one run, started by hand.

To reproduce:

  1. Copy the four files into a fresh target/next_step/<dir>. The binary refuses any other directory.
  2. Build next_step_main with t27b.
  3. Run NS_MODE=feed NS_FEED_DIR=target/next_step/<dir> next_step_main.

Autonomy stays closed. autonomy_allowed is false. All five gates are false: PTY_HAS_LEASE, PTY_SPAWN_REPLY_CHECKED, PTY_KILL_ENDS_GROUP, PTY_STOP_REACHES_DETACHED, PTY_ENDS_ARE_NAMED.

Publication checks. lefthook run pre-push passed: secret-gate, own-language and foreign-budget. tools/dupe_scan.py found no new duplicate body. These are checks, not tests.

Not in this PR

Diff

  • 14 files, 6520 insertions, 0 deletions.
  • 1428 lines of pure specs, 737 lines of host spec, 68 lines of fixtures, 4 ledger rows and 953 lines of docs.
  • docs/coordination/dsh-to-t27os-audit/audit-inventory-2026-11-01.tsv adds 3330 lines. It is the per-file corpus inventory behind the migration doc's counts. No test or replay reads it, so it can be dropped in a follow-up commit if review prefers.

🤖 Generated with Claude Code

gHashTag and others added 12 commits November 2, 2026 11:21
…12884)

First package of the DSH -> T27 OS migration (owner order 2026-11-01):
audit scope on origin/master 7fb6bc2 (3329 .t27 files, 105 under
specs/t27os), T27 OS module map with host dependencies, DSH behaviour
against T27 OS capabilities (15 rows), prioritised backlog with
executors, first chat scenario status with its blocker, own diff and
checks. Data files under docs/coordination/dsh-to-t27os-audit/.

Backlog issues filed, states read back after filing (no labels set):
#13069 OPEN, #13070 OPEN, #13071 OPEN, #13072 OPEN, #13073 OPEN,
#13074 OPEN.

Prose and tool-written data only; no code in any language; not pushed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…isk finding (Refs #12884)

The A1 draft of specs/t27os/chat_log.t27 (pane 13, free tier) failed the
single-spec check twice from shell cell 12: a line holding only ';' at 4:1,
then 'let' at 141:10 (70 such lines in a Rust-like dialect). Round 2 of 3
went to the pane as a self-contained message because the gitignored scratch
folder holding the brief and the pane report was removed at 22:49. The
pane's own report claimed 327 lines, 19 tests and "implemented" while the
file had 696 lines and 16 tests, so the package marks it as no evidence.
The spec stays untracked; the test report is pending, blocked by disk.

Disk: DSH Web leaves dsh-workspace-changes-* snapshot trees in the user's
temp folder (ten trees, 34 GiB, still being rewritten at 22:57; free
space fell from 1.2 GiB to 116 MB in five minutes). Recorded as a DSH
behaviour row, a checks row and a request to the owner; this session
deleted nothing.

Refs #13069

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#12884)

Pure module QueenNextStep: unavailable_reason names the first refusal
of one candidate (permission, approval park, blockers, slot, budget,
isolation); pick returns the admissible candidate that outranks the
others by queen::priority::outranks, or NO_PICK (WAIT). A step parked
for approval does not stop an independent one; an unread report never
blocks the next step.

Checked on this revision (sha256 prefix cba4384cd8f1ddf4) in a shell
cell, single spec: typecheck rc 0; test-report rc 0, 9 tests, 9 pass,
0 FAIL, 1 invariant, vacuous 0 of 9. Negative control: removing the
reason filter in pick fails 4 tests. No runtime measured; nothing
wired; no conductor started.

The coordination doc gets one row for attempts 2 and 3 and the review.

Refs #6657

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pick used to loop to n with an i < MAX_CANDIDATES guard: no read left
the arrays (the guard lowers to a short-circuit Zig and), but a count
above 4 was silently clamped and the loop still ran n times. pick now
returns PICK_BAD_INPUT (254, distinct from NO_PICK 255) for n > 4
before any element is read.

New test pick_input_bounds covers n = 0, 3, 4, 5, 255 and 4294967295.
Checked on this revision (sha256 prefix 67d0b4a177c73816) in a shell
cell, single spec: typecheck rc 0; test report rc 0, 10 tests, 10
pass, 0 FAIL, vacuous 0 of 10. Negative control: the old clamping
logic under the new tests fails pick_input_bounds (rc 1). No runtime
measured; nothing wired.

The coordination doc withdraws the "efficiency only" note and adds
one row for this revision.

Refs #6657

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Refs #12884)

queen::control already routes EV_REVIEW, EV_WORKER_IDLE and
EV_TASK_CREATED to R_DISPATCH and answers SRC_AUTO when no manual
assignment is pending; its comment hands that choice to the priority
order. decide composes event_applies, reaction_of, pick and
next_source in this module, so control.t27 and its seal stay as they
are, and dispatch.t27 keeps the measured FIRST-survivor rule.

Four integration tests: A parked and outranking, B blocked until the
accept sets VERIFIED, then picked; an unread or read report gives the
same answer; a redelivered event gives D_STALE and one assignment at
fence 1; nothing admissible gives NO_PICK (WAIT).

Checked on this revision (sha256 prefix 3f32dc16) in a shell cell,
single spec: typecheck rc 0 (1 warning, 9 parameters); test report
rc 0, 14 tests, 14 pass, 0 FAIL, vacuous 0 of 14. Negative control,
dedup check removed: rc 1, 2 FAIL. Nothing calls decide at runtime;
the live chooser is the trios supervisor round. Not measured.

Refs #6657

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pt, verifier, next decision (Refs #12884)

next_step_run.t27 holds the pure run record: dedup by sequence, one
attempt per task, the acceptance want stored at creation, approval that
only expires, and the verifier verdict. next_step_main.t27 is a one-shot
t27b host binary: it reads an injected event, calls run_decide, journals
the attempt before the launch, runs t27c test-report as the executor,
runs t27b test as an independent verifier, and makes the next decision.
No daemon, no conductor, no cron, no network, no credentials; files only
under target/next_step/run/.

The contract describes deduplication, fences, replay and the effect
journal; the runtime behaviour is measured only by the journal of a run.
Measured once, by hand-injected event: decide 1, attempt 1 verified 14/14,
replay 253 with no launch, next decision 255 WAIT. Nothing feeds live
Queen events into it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ep_main (Refs #12884)

Each row is a measured t27b pass in a T27 OS shell cell on 2026-11-02:
next_step.t27 14/14, next_step_run.t27 11/11, next_step_main.t27 3/3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er binds task and spec (Refs #12884)

pane_feed.t27 reads one PTY LIST snapshot, normalises it and keeps its own
cursor: DUP, CLASH, OLD, GAP (resync, no decision), BASE, LEASE_LOST. Only an
applied WORKING to IDLE edge of the leased pane becomes EV_WORKER_IDLE; another
slot's change is counted, never decided. The autonomy gate answers no while the
server has no lease, the spawn client ignores the reply and kill stops only the
direct child.

next_step_main: NS_MODE=feed journals intended decisions and never opens run/;
on_verify refuses a task other than B, wants the report header of the spec it
named and builds the report line from the record.

Doc sections 7.4 and 7.5: the event source, the adapter cases, the measured
output-follows-state property, and the enable package (hook point, executor
limits, permissions, budgets, stop, rollback). Nothing is enabled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eeps autonomy closed (Refs #12884)

LIST is a snapshot of observed state, not a journal of execution events. A
WORKING to IDLE edge of the leased pane is possible output silence, so
feed_signal now gives FEED_QUIET (254), one extra check asked, which decide
answers with no dispatch; NS_MODE=feed journals it and no longer calls decide.

Two more gates, PTY_STOP_REACHES_DETACHED and PTY_ENDS_ARE_NAMED, both false;
autonomy_gates needs all five plus a deadline, and a test shows that the
stage-1 PTY patch alone leaves it false. The migration doc 7.4 and 7.5 follow:
the old "decision of B" reading is withdrawn, the next slice is an explicit
attempt end (task_id, attempt_id, exit code) and a confirmed cell right, and
the install request is split into four stages.

The contract describes deduplication, fences, replay and the effect journal;
the runtime behaviour is not measured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cks defer to #13088 (Refs #12884)

A test server on its own HOME gets its own socket, but run_server and the
spawn path load keys through /usr/bin/security, so starting one would read
Keychain items. The no-keys isolation edit is kept as a separate diff, not
applied; the installed client against an empty HOME prints "no server".
Another session's local commit for #13088 already carries the spawn and kill
reply checks, so only the process-group kill stays this lane's draft. Two
internal session ids are dropped from the lane table.

The contract describes deduplication, fences, replay and the effect journal;
the runtime behaviour is not measured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Section 7.6 sorts every result of sections 7.3 to 7.5 into real
observations, fixtures and modified copies, pure tests and measured one-shot
runs, so that none is cited as another. The lease on pane 14 is a lease the
run named, not an observed change of a live slot; the feed cursor is the
adapter's own position, not a saved position of an upstream journal.

The contract describes deduplication, fences, replay and the effect journal;
the runtime behaviour is not measured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…12884)

Byte copies of the real snapshots the replay read (s1 base, s2 idle edge,
s3 duplicate of s2, s4 older copy of s1). No test reads them; they let a
reviewer repeat the replay by copying them into target/next_step/<dir>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-11-02 05:47:25 UTC

Summary

Status Count
Total Open PRs 44
PRs with Failing Checks 40
PRs with All Checks Green 4
READY 3
FAILING 40
PENDING 0
NO CHECKS YET 0

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e75b498e5e79 != 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).

This was referenced Nov 9, 2026
@cursor
cursor Bot enabled auto-merge (squash) November 9, 2026 19:51
@cursor
cursor Bot merged commit 8f6fe36 into master Nov 9, 2026
38 of 39 checks passed
@cursor
cursor Bot deleted the lane/next-step-feed-12884 branch November 9, 2026 19:52
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