Skip to content

engine: 028 face 5 — declared-but-empty vault key warns, never blocks - #4

Open
Morgandri1 wants to merge 3 commits into
mainfrom
sdk/028-face5-declared-overlap-warning
Open

engine: 028 face 5 — declared-but-empty vault key warns, never blocks#4
Morgandri1 wants to merge 3 commits into
mainfrom
sdk/028-face5-declared-overlap-warning

Conversation

@Morgandri1

Copy link
Copy Markdown
Owner

Summary

  • crates/wheel-engine/src/vault.rs: split find_ambiguity (was offered_keys = declared ∪ stored) into a stored-only find_ambiguity (the only thing that blocks a wire or an agent's env — a real credential clash) and a new find_declared_overlap (declared-only, non-blocking).
  • crates/wheel-engine/src/db/board.rs: add_wire still refuses a STORED clash (409 ambiguous_credential), but now returns Ok(Some(warning)) instead of erroring when two vaults merely declare the same key.
  • crates/wheel-engine/src/api/board_routes.rs: POST /v1/wires returns 200 {} normally, 200 {"warning": "..."} when a declared overlap exists — never a 409 for that case. (Web's request() helper already handles a JSON 200 the same as the old 204; the one caller, canvas.tsx, doesn't read fields off the response, so this is compatible today.)
  • Updated/added vault unit tests: replaced the test that encoded the now-overruled behavior with one proving the declared-empty case is unblocked (a_declared_but_empty_key_does_not_block_the_vault_with_the_real_value) plus one proving a real stored clash still blocks (two_stored_values_for_the_same_key_are_still_blocked); fixed two pre-existing tests that relied on declared-only ambiguity to store real values instead.

Ref: redteam/findings/028-declared-but-empty-credential-reports-authenticated.md face 5, PM's overrule in docs/handoff/sdk.md item 4.

Test plan

  • cargo build --workspace
  • cargo test -p wheel-engine — 265 passed
  • cargo clippy -p wheel-engine --all-targets -- -D warnings — clean
  • cargo fmt -p wheel-engine -- --check — clean
  • redteam/pocs/vault/run_declared_empty.sh §5 live against a rebuilt image (no docker in this sandbox to run it here) — asking ADVERSARY to re-verify per their handoff doc

@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

Deployment failed for project wheel with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/morgandri1s-projects?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Sep 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
wheel Ignored Ignored Preview Sep 6, 2026 3:42pm UTC

@Morgandri1
Morgandri1 force-pushed the sdk/028-face5-declared-overlap-warning branch from 2459a0d to 2824759 Compare September 6, 2026 16:52
SDK/Engine added 3 commits September 6, 2026 17:46
find_ambiguity judged presence on offered_keys (declared ∪ stored), so a
vault that merely DECLARED a credential key with no value stored still
409-blocked wiring a second vault that actually held it. PM overruled
this: presence is a stored value everywhere (face 1 already fixed
`GET .../auth` on this basis); a declaration is a statement of intent,
not a competing credential.

find_ambiguity is now stored-only (list_keys) and is the only thing that
blocks a wire or an agent's env. The declared/declared case is still
worth surfacing — two vaults both intending to supply the same
credential is real information for the operator — so it is now
find_declared_overlap, returned as a non-blocking `warning` in
POST /v1/wires's response instead of a 409.

Acceptance: redteam/pocs/vault/run_declared_empty.sh §5 (v declares
CLAUDE_CODE_OAUTH_TOKEN with no value; v2 holds the real one; wiring the
agent to v2 must succeed, not 409).
Written from a fresh wheel-dev session so the next stand-down (or the
next session of me) has this turn's state without re-deriving it.
…ck a real one there either

PM ruling: the wire-time fix (find_ambiguity/find_declared_overlap) and
the PUT-time check (supplies_key, in store_in_vault_until) are the same
finding class -- presence is a stored value everywhere. supplies_key
used offered_keys (declared union stored), so a vault that only
DECLARED a key still 409-blocked PUTting the real value into a second
vault the same agent reads.

supplies_key is now stored-only (list_keys) -- the only thing that
blocks a PUT. A new declares_key (declared-only) surfaces the
declared/declared overlap as a non-blocking `warning` in the response,
same shape as add_wire's: PUT /v1/vault/:id/:key now returns
{"key","stored":true,"warning"?} instead of bare {"key","stored":true},
and the paste-code login route (agent_routes.rs) merges this into its
existing warning field rather than clobbering the session-credential
one.
@Morgandri1
Morgandri1 force-pushed the sdk/028-face5-declared-overlap-warning branch from ccd0a90 to c8372f1 Compare September 6, 2026 17:47
Morgandri1 added a commit that referenced this pull request Sep 6, 2026
The 202 envelope's `delivered` counts rows the engine ENQUEUED
(wheel-engine/src/api/ingress.rs:331-345 increments per successful
messages::enqueue, and discards the spawned supervisor.start result), so a
parked, stopped or unauthenticated agent still returns delivered:1.

Under the message states (§3c #4) `delivered` means the bytes reached the
child's stdin. The panel was repeating the wire's word and adding emphasis to
it — "This was a real hit, not a simulation" — which is the strongest possible
claim on the weakest available evidence, aimed at an operator who is testing
precisely because they do not yet trust the path.

It now reports the count and says queued, naming the parked case. The test
asserts the number survives AND that the sentence cannot claim receipt; the
old wording fails it.
Morgandri1 added a commit that referenced this pull request Sep 7, 2026
Was pre-M1 (findings 001-011, all design-review). Now: stack boots+deployed,
most findings CONFIRMED-by-run or CLOSED. Leads with PM's theme — the
convincing half is built, the load-bearing half is not (048 network, 047
re-check, 037 per-node), and the measure-vs-claim discipline incl. my own 048
correction. Open/load-bearing table, closed highlights, top-3 (gate script-exec
on 037/038 + 048; land per-node uids; deploy S5b segmentation + deploy-check).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbyG7euRsVotMStegDRxRY
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