Skip to content

test(agent-challenge): lock review ack on discovered Phala app_id - #2

Open
alpha1122x wants to merge 1 commit into
feat/ac-attestation-provenance-multiaccountfrom
test/review-deployed-discovered-app-id
Open

test(agent-challenge): lock review ack on discovered Phala app_id#2
alpha1122x wants to merge 1 commit into
feat/ac-attestation-provenance-multiaccountfrom
test/review-deployed-discovered-app-id

Conversation

@alpha1122x

Copy link
Copy Markdown
Owner

Stacked on #1.

Why

The live review ack returned 409 review_deployed_conflict. Diagnosed against the production DB (read-only) for assignment ra_hAVZdRfdxbU5VCr_3QRIQdmrOfbhefZS:

Field Value Rules out
current_assignment_id matches request not a stale assignment
deployed_at / deployed_receipt_json NULL not a duplicate ack
phase at ack (+12s), expiry 30m still review_queued not expiry/phase
assignment app_identity f024ea2315… (operator pin)
receipt app_id 49b6c172… (discovered) root cause

Live error: review deployed acknowledgement receipt app_id mismatches assignment.

A non-operator deployer always mints a different app_id, so the server-side pin rejected every multi-account deployment by construction. The 409 is direct evidence that the multi-account change was necessary.

What this PR does

Tests only — the production fix (dropping the app_id pin) already landed in #1 (1b18bf71). The running master image is stale and still pins; it needs a redeploy.

Locks four behaviours through mark_review_deployed:

  • discovered app_id != assignment pin is accepted
  • identical re-ack is idempotent (no 409)
  • a receipt rebound to different values is still rejected
  • a rebound compose_hash is still rejected — trust anchors (compose_hash + KMS digest) preserved

Not fixed here

report_generation_failed on the review guest. It is downstream of this 409 and needs a re-run after the master redeploy to confirm.

Tests

57 failed, 3266 passed, 9 skipped, 6 errors — identical failure set to baseline (zero newly broken, +4 passes). Pre-existing failures/errors are unrelated. Blackbox 17 failed / 19 passed. ruff clean.

The live review ack returned 409 review_deployed_conflict because the
server pinned receipt.app_id to the assignment app_identity. A non-operator
deployer always mints a different app_id, so that pin rejected every
multi-account deployment by construction.

Cover the ack path through mark_review_deployed: a discovered app_id is
accepted, an identical re-ack stays idempotent, and a rebound receipt or
rebound compose_hash is still refused so the trust anchors hold.
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.

2 participants