Skip to content

fix(intake): never default an unknown approval status to approved and ship a boto3 that knows the registry - #402

Merged
gibbsie merged 1 commit into
mainfrom
fix/intake-status-sdk-and-default
Oct 26, 2026
Merged

gibbsie merged 1 commit into
mainfrom
fix/intake-status-sdk-and-default

Conversation

@gibbsie

@gibbsie gibbsie commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Problem

Two bugs in the intake post-fabrication status flow:

  1. Dangerous default. When the live registry lookup failed (e.g. UnknownServiceError because the container's botocore predated the agent-registry-control service model) AND the job row had no registryApprovalStatus snapshot, _plain_state defaulted to "built and approved" — the worst possible fallback, presenting an unverified agent as governance-cleared.

  2. Missing SDK service model. The container's requirements.txt used boto3>=1.43.56 (a floor, not a pin). A cached image layer could resolve to a boto3/botocore release that predates agent-registry-control, causing _get_registry_client() to raise UnknownServiceError at runtime and forcing every status check into the snapshot fallback path — which hit bug 1.

  3. Fabricator snapshot gap. _write_fabrication_status in the fabricator only wrote registryApprovalStatus when run_state.pending_approval was non-empty. Auto-approved jobs got no snapshot at all, so even a working snapshot fallback in postfab had nothing to read.

Changes

service/agent_intake_single (container stack)

  • tools/postfab.py: Changed _plain_state fallback from "built and approved" to "built; approval status could not be confirmed" when the snapshot field is absent or unrecognised. Upgraded _resolve_registry_status logging from logger.warning to logger.error with a structured metric-friendly message so CloudWatch metric filters can alert on registry-client unavailability.
  • requirements.txt: Pinned boto3==1.43.116 (matching the fabricator pin) to guarantee agent-registry-control is present in the container image. botocore 1.43.116 includes the service model; the old >=1.43.56 floor could resolve to a release without it.
  • tests/test_botocore_registry_service.py: New container-level smoke test that asserts 'agent-registry-control' in botocore.session.get_session().get_available_services(). Fails in any env with an old botocore — must be run with the pinned deps.
  • tests/test_postfab_approval_status.py, tests/test_postfab_live_registry.py: Updated three test assertions from "built and approved" to "built; approval status could not be confirmed" to match the new safe default.

arbiter/fabricator (arbiter stack)

  • index.py: _write_fabrication_status now writes registryApprovalStatus='approved' on every COMPLETED job (when run_state.pending_approval is empty), instead of omitting the field. This ensures the snapshot fallback path in postfab always has a value to read.

Testing

  • 467/467 service tests pass (including the new botocore smoke test)
  • 2523/2523 arbiter tests pass (1 skipped, pre-existing)
  • Verified botocore 1.43.116 includes agent-registry-control: True
  • Verified the old floor boto3>=1.43.56 resolves to botocore 1.43.118 on a fresh pip install (also True), but this is not guaranteed for cached Docker layers — the pin eliminates that variable.

@gibbsie
gibbsie merged commit e6ebe6f into main Oct 26, 2026
15 checks passed
@gibbsie
gibbsie deleted the fix/intake-status-sdk-and-default branch October 26, 2026 04:41
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