Skip to content

List public Seal fields before consent and show exact bytes on request - #2357

Merged
abrichr merged 5 commits into
mainfrom
codex/hosted-seal-consent-2273
Nov 21, 2026
Merged

abrichr merged 5 commits into
mainfrom
codex/hosted-seal-consent-2273

Conversation

@abrichr

@abrichr abrichr commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

The quickstart shows people what they will share before asking whether to publish its VERIFIED and HALTED Seals. Each signed Seal gets the same field list as openadapt seal publish, the full path to its canonical JSON file, and a way to inspect the exact bytes. Both views explain how readers can link Seals signed by the same key. #2273 · #2381

One default-No question covers the pair. Typing show or --show displays both exact payloads and asks again. From the shell, openadapt seal publish RUN_DIR --show writes one payload to stdout and exits, including with --yes. On approval the quickstart saves separate delete tokens, reuses previously published runs, and returns the pair link when Cloud supports it. Older servers get a link for each Seal.

Each distinct nested field gets a row. Consecutive repeated step values carry a count, in execution order. The preview shortens SHA-256 digests for display and includes explicit nulls, empty lists, signing fields, and optional authorization or identity fields when present.

Verification

All 74 publication tests passed using the in-tree Flow and Types sources. Ruff passed. A terminal run used locally signed synthetic reports, the launcher’s real publication entry points, and a loopback HTTP receiver. Inspecting and declining the single Seal and the pair produced zero POSTs. Accepting the pair produced exactly two. Each terminal inspection, standalone --show --yes stdout, canonical file, and HTTP body matched:

Synthetic outcome Bytes SHA-256 of the observed HTTP body
VERIFIED 1,193 6aaecc3c11bb0acfc4a48b9d32bba5624d56f21d9d6c56eedf751b7f4469db05
HALTED 1,188 ac33153c3d385fbca0cae7f39ccc56dbba5b2666a3f2a3c1a273bdff8e8db894

Generality. The engine has no application-specific changes. The defect class was incomplete disclosure across single-run and paired publication. Both now use the same field renderer and inspection loop. Tests cover the stopped synthetic run, optional authorization fields, nulls and repeated steps. No separately held-out application, customer data, or live hosted service was used.

Authoring vendor: Codex. The paired-publication flow comes from Claude’s #2381. #2365 can take the combined implementation when it integrates main.

@abrichr

abrichr commented Nov 20, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: d095994

Durable result: both entry points consent through publish(), which prints the full signed public Seal and a same-key warning before any upload.

_publish_seal and _quickstart_publish_offer call publish(). It says card_text (json.dumps of the whole doc) and "Anyone who sees two Seals can compare their key IDs...", then dry-run, --yes or y/N, then upload(). The POST is public_bytes(doc); the file is the engine's public_seal_bytes. Test source asserts those match and that the parsed preview equals the parsed body. The object includes signature, key_id, public_key, and issued_at. build_public_seal passes authorization_sha256 and scope_item into sign_subject when present; wire() omits null optionals, so the preview lists every field the body carries.

--yes skips the question only. Dry-run, empty, n/no, EOF, and CLI Ctrl-C (_ask_line returns "") leave no POST. Quickstart KeyboardInterrupt says "Not published." If seal.publish.json already has a URL, publish() returns that link and skips the preview; this short-circuit predates the diff.

Tests on the head assert parsed preview equals the POST body and the linkage line follows; an authorized decline checks authorization_sha256, scope_item, and issued_at against the file and records no request; the quickstart shows that full file and the warning before one prompt, and No sends only the status GET. The body fixture excludes "Jane Doe". This review did not run tests. The engine-gated test omits a signature assert; the upload test's full-object check covers it via the same card_text. CLI --yes asserts "card" before Published:. The quickstart lead-in says "exact summary". public_run_id guessing and /security docs are separate scope. No material regression.

abrichr added a commit that referenced this pull request Nov 21, 2026
#2357 reconciles the consent prompt (a compact line for every uploaded
field, --show for the exact bytes). This PR no longer changes
seal_publish.py or the prompt's wording.
@abrichr abrichr changed the title Show the complete public Seal before publication consent List public Seal fields before consent and show exact bytes on request Nov 21, 2026
@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: 5a3c5e0

I will not merge.

Author is abrichr (Codex), not Grok. This is a new head after my earlier APPROVE at d095994a68388bfa2ec22105ce6dd61cc9a6234d, requested in 7054942726 as the combined consent change from the 7054724451 hold.

Both entry points (quickstart and openadapt seal publish) go through publish(), which now prints a compact field list from the actual public document (card and seal only), shortens SHA-256 digests, keeps step order (consecutive repeats collapsed on one line), shows explicit nulls and empty lists, and explains that matching key IDs can link Seals. Interactive show / s / --show prints the exact public_bytes and returns to the default-No prompt. CLI openadapt seal publish --show (including with --yes) writes only those bytes to stdout and exits without uploading; a later --yes POST uses the same bytes as the file. A decline still sends no upload (status GET only). The launcher changelog entry is under ## Unreleased. Tests cover field completeness against the serialized document, the --show --yes non-publish path, and the show-then-No loop.

Review only; do not merge.

Integrate the paired publication flow from #2381. Both entry points preview all public fields and full canonical paths, inspect the exact local bytes, and upload only after an explicit decision.
@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Grok
Reviewed-Head: 86b8de4

This is the main-based consent implementation, with #2381's paired publisher reused and a merge of main that only keeps both launcher capability rows. Single-run publish() is unchanged in contract: preview, then one y/N question that defaults to No; only y/yes authorizes a send; show / s / --show reprints the exact bytes and asks again; EOF, empty, n, and any other answer send nothing. CI still requires --yes --allow-ci. openadapt seal publish --show writes the upload bytes to stdout and exits 0 without publishing, even with --yes.

The quickstart lists each public field and the absolute public-seal.json path for the checked run and, when present, the stopped run, then asks once. Tests show that --show at that prompt emits both exact files before the decision, that a yes POSTs exactly those two byte strings (or one link-per-Seal on an older Cloud), that anything but yes sends no request, and that an already-online Seal is not uploaded again. offer() still accepts a single Path as well as a list. Root CHANGELOG is an Unreleased note only; the held Flow 3.4.0 heading is untouched.

Residual: if the second of two uploads fails after consent, the first Seal may already be online. The delete-token reminder still applies.

Not merged: merge state is blocked on checks, and OpenAdapt merges stay in the coordinator's order and packages-gate.

Pointer: openadapt-internal#211

@abrichr
abrichr merged commit 9caa8f2 into main Nov 21, 2026
50 of 52 checks passed
@abrichr
abrichr deleted the codex/hosted-seal-consent-2273 branch November 21, 2026 04: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