Skip to content

fix(queen): the Linux copy of the policy had drifted, and its gate ran nowhere - #478

Open
gHashTag wants to merge 5 commits into
feat/queen-supervisorfrom
fix/queen-core-sync-in-ci
Open

gHashTag wants to merge 5 commits into
feat/queen-supervisorfrom
fix/queen-core-sync-in-ci

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Eleven policy files exist twice, and the gate for it ran nowhere

rings/SR-00 is compiled by the app. agent-server/queen-core/Sources/QueenCore is the copy the Docker build compiles for Linux, because the build context cannot reach up out of the agent-server directory.

make queen-core-sync compares them byte for byte, and its own comment states the stakes:

"the copy is compiled by the Linux stage and the original by the app, and a policy that differs between them is two arbiters of the same rule."

It appears in no workflow. I checked all thirteen files: twelve identical, one not.

The drift, dated

ring gains a string-aware literal view 2026-09-055255e0bee (browseros-ai#1176)
Linux copy last touched 2026-08-29

The fix never crossed. And it is not a comment: the copy is missing var inString and the entire escape-and-quote branch.

So on Linux the literal view is still the version the ring's own comment describes being burnt by — a /* inside a quoted branch glob ("No empty queen/* branch …", line 6864 of ChatViewModel.swift) opening a phantom block comment and blanking the file from there to the end:

"6 726 lines of evidence invisible: corroboration saw no mentions past the glob, so browseros-ai#1158's two candidates tied at zero and rule 4 answered with a mid-body window of the wrong function."

QueenLocalisation is reached from QueenEvidencePolicy inside queen-core, so this is in the artifact Linux runs — not a stray file.

Two changes

The copy is synced to the ring.

The gate now runs, on ubuntu, in trios-logic.yml. It is cmp — it costs seconds and does not need the compiler that consumes its result. The workflow's paths gain trios/agent-server/queen-core/** so a hand-edit of either side wakes it; watching only the ring would leave the same hole facing the other way.

Proven both directions before wiring

with the drift:  [FAIL] the Linux copy of the Queen's policy has drifted:
                   DIFFERS  QueenLocalisation.swift
                 make: *** [queen-core-sync] Error 1

after the sync:  [OK] queen-core-sync: the Linux copy is byte-identical to rings/SR-00

How it was found

Yesterday's round discovered seven tests that had skipped in CI forever. The follow-up question was "what else never runs?" — and this is the answer for the Swift side: the group-coverage gate is excellent (run-test-group.test.ts cross-checks the CI matrix in both directions), so the hole was not there. It was in a make target no workflow invoked.

…n nowhere

Eleven policy files exist twice. `rings/SR-00` is compiled by the app;
`agent-server/queen-core/Sources/QueenCore` is the copy the Docker build
compiles for Linux, because the build context cannot reach up out of the
agent-server directory. `make queen-core-sync` compares them byte for byte and
its comment states the stakes: "a policy that differs between them is two
arbiters of the same rule."

IT APPEARED IN NO WORKFLOW. Measured 2026-09-06 across all thirteen files:
twelve identical, one not.

`QueenLocalisation.swift` gained a string-aware literal view in the ring on
2026-09-05 (browseros-ai#1176). The copy that ships to Linux was last touched 2026-08-29.
The fix never crossed, and it is not a comment: the copy is missing
`var inString` and the whole escape-and-quote branch, so on Linux the literal
view is still the version the ring's own comment describes being burnt by - a
`/*` inside a quoted branch glob (`"No empty queen/* branch ..."`, line 6864 of
ChatViewModel.swift) opening a phantom block comment and blanking the file from
there to the end. 6,726 lines of evidence invisible, two candidates tied at
zero, and a range answered in the middle of a function the spec never named.

`QueenLocalisation` is reached from `QueenEvidencePolicy` inside queen-core, so
this is in the artifact Linux runs, not a stray file.

TWO CHANGES. The copy is synced, and the gate now runs on ubuntu in
`trios-logic.yml` - it is `cmp`, it costs seconds, and it does not need the
compiler that consumes its result. The workflow's paths gain
`trios/agent-server/queen-core/**` so a hand-edit of EITHER side wakes it;
watching only the ring would leave the same hole facing the other way.

Proven both directions before wiring: with the drift in place the gate prints
`[FAIL] ... DIFFERS QueenLocalisation.swift` and exits 1; after the sync it
prints `[OK] ... byte-identical`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@github-actions github-actions Bot added the fix label Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

❌ Tests failed — 1/2088 failed

Suite Passed Failed Skipped
agent 87/87 0 0
build 9/9 0 0
cdp-protocol 5/5 0 0
eval 93/93 0 0
server-agent 272/272 0 0
server-api 944/974 0 30
server-browser 6/6 0 0
server-integration 10/11 0 1
server-lib 273/273 0 0
server-pglive 3/3 0 0
server-root 68/68 0 0
server-skills 31/31 0 0
server-tools 241/242 1 0
shared 14/14 0 0
Failed tests
  • server-toolssearch_dom > finds text across multiple elements

View workflow run

The same audit that found queen-core-sync unwired found five more that need no desktop. Four are wired here; each was RUN against the shipping ref first rather than assumed to pass:

sources-drift, sources-drift-selftest, binary-drift, run-completeness-selftest - all four pass in seconds.

NOT drift-guard, which the audit also surfaced: it is one line invoking run_chat_sse_e2e.sh with an extra scenario enabled, it drives the Swift compiler, and it did not finish inside four minutes. Its own comment calls it 'slow, explicit, never accidental', and the script it wraps already runs in swift-logic. Wiring a gate that hangs is worse than leaving it unwired.

Separate steps rather than one `make a b c d`: make stops at the first failure, and a single step would report one broken gate while hiding the state of the three behind it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@gHashTag

gHashTag commented Sep 6, 2026

Copy link
Copy Markdown
Owner Author

Widened: five gates now run, in 11 seconds

The same audit that found queen-core-sync unwired found five portable gates in total. Four more are wired here — and each was run against the shipping ref before being wired, not assumed to pass:

gate what it guards
queen-core-sync the Linux copy of the policy against the ring, byte for byte
sources-drift the build's source list against the tree
sources-drift-selftest …and the proof that gate can still fail
binary-drift the shipped binary against what the tree builds
run-completeness-selftest the test-run parser, against known transcripts
portable-gates   pass   11s

Separate steps, not one make a b c d: make stops at the first failure, and a single step would report one broken gate while hiding the state of the three behind it. Which gate failed is the whole content of the answer.

One gate deliberately left unwired

drift-guard came out of the same audit and is not here. It is one line — bash run_chat_sse_e2e.sh with an extra scenario enabled — it drives the Swift compiler, and it did not finish inside four minutes. Its own comment calls it "slow, explicit, never accidental", and the script it wraps already runs in swift-logic.

Wiring a gate that hangs is worse than leaving it unwired.

The audit tool was wrong twice, and both were caught the same way

tri unwired (in #475) classified check-bypass and drift-guard as portable. Both wrong:

  • check-bypass is $(MAKE) check — following only prerequisites saw an empty recipe. Its own echo says "never for CI", which is how it was caught: the tool disagreed with the target's description of itself.
  • drift-guard hides its compiler inside a shell script. A scan of make recipes sees one layer; a script is the second.

There is a third answer now — opaque — rather than a guess. The portable list went 11 → 9 → 6 → 3 as each layer was followed, and every step of that shrinking was a false accusation withdrawn.

gHashTag and others added 3 commits September 6, 2026 15:55
trios/apps/website is the t27.ai dashboard - the page anyone reads to see what the Queen is doing. It carries a contract that imports the REAL page module and pins the review lifecycle against the closed set of states the server publishes.

Measured: the string 'apps/website' appeared in NO workflow in this repository. Typecheck, the contract (194 checks) and the build all pass and always had - nothing was broken. What was missing was anything that would notice when the server's published states and the page's copy of them stop agreeing, which is the one thing the contract exists to catch.

Its own workflow rather than a job in 'trios logic': that one runs a macOS Swift job, and a paragraph of website CSS should not wake a Mac runner. Separate steps, so the answer says which of the three failed - `bun run check` chains them with && and reports only the first.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…aration

`make check` names its gate suite in one line of prerequisites - 24 of them - and CI ran 8. A word-list audit had missed type-floor, recipe-backticks and skill-frontmatter entirely, because they are named after their SUBJECT rather than their function: nothing in 'type-floor' or 'vendor-step' says gate. When the system under audit declares the thing you are inferring, read the declaration.

All three measured against the shipping ref first. All three pass in seconds.

NOT t27-rings, and the reason is written where the next person will look. It is the best gate in the suite - Verilog generated from the .t27 source, compiled with iverilog, simulated under vvp and checked against the Swift table, on top of a 460-case Rust parity - and it passes. But t27c is built from a SEPARATE repository this checkout does not contain, and the target is written to SKIP rather than fail when the toolchain is absent. Wiring it would manufacture a green job that runs nothing, which is the defect this file was added to end.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`t27-rings` generates Rust from rings/T27-00/queen_core.t27 and checks 14 rows and 21 constants against the Swift table, does the same for the A2A rules in T27-01, then generates VERILOG from the same source, compiles it with iverilog and simulates it under vvp. It is the strongest claim this repository makes about itself, and it ran nowhere.

It was left unwired one round ago on purpose: t27c is built from a SEPARATE repository and the target SKIPS - exit 0 - when that toolchain is absent, so wiring it as-is would have produced a green job that measured nothing. The repository is public, so the honest version is to fetch it. Verified end to end locally first: a fresh --depth 1 clone carries bootstrap/, cargo builds t27c from it, and all three halves pass.

AND THEN PROVE IT MEASURED. The target says '[SKIP] ... NOT MEASURED' in plain words and still exits 0 - good manners, useless to CI. The step greps for that phrase and fails on it, then demands ring00_parity, ring01_rules and ring00_verilog by name, so a future edit that quietly drops one cannot pass by leaving the others green. A gate that can silently skip needs a second gate on top of it.

The clone is read-only, into the runner temp, never into the checkout: nothing here writes to that repository.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant