Repository navigation
fix(intake): report build status from the live registry record instead of a fabrication-time snapshot - #401
Merged
Conversation
added 2 commits
October 26, 2026 03:11
…d of a fabrication-time snapshot
…cords
The live API rejects the top-level 'name' query-string parameter that
the bedrock-agentcore-control SDK model exposes. Switch to
agent-registry-control (same client the fabricator uses) and pass
filters=[{name:'recordType',values:['CUSTOM']},{name:'name',values:[agent_name]}]
exactly as arbiter/fabricator/index.py::_find_existing_record_id does.
Add ParamValidator tests proving the old shape is rejected by the real
service model and the new shape is accepted.
Live-verified: _resolve_registry_status('arbiter-agent', 'Default')
against registry 7wjYVSCFgfe63ATN returns DRAFT.
| org_id = "" | ||
| try: | ||
| org_id = request_context.current_session().org_id | ||
| except (RuntimeError, AttributeError): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(intake): report build status from the live registry record instead of a fabrication-time snapshot
Problem
check_fabrication_statusderived its "built and approved" / "awaiting approval" text fromregistryApprovalStatuson the DynamoDB job row — a write-once snapshot stamped at fabrication time. After a human approved (or rejected) the agent on the Approvals page, or when the agent was never submitted for approval (DRAFT), the status text was wrong: a freshly-approved agent still said "awaiting approval", and a DRAFT agent showed as "built and approved".The initial live-registry fix used
ListRegistryRecords(name=agentName)on thebedrock-agentcore-controlclient, but the live service rejected the top-levelnamekwarg:'Unknown parameter in input: name, must be one of: registryId, maxResults, nextToken, filters'.Root cause
Two botocore service models for the same registry API:
bedrock-agentcore-control(older) — exposesnameas a query-string parameteragent-registry-control(newer) — exposesfilters(the shape the live service accepts)The service was using the older model; the fabricator already used the newer one.
Fix
_get_registry_client()inpostfab.pyfrombedrock-agentcore-controltoagent-registry-control(matchingarbiter/fabricator/index.py)filters=[{name:'recordType',values:['CUSTOM']},{name:'name',values:[agent_name]}]exactly as_find_existing_record_iddoes (the fabricator's source of truth)DRAFTPENDING_APPROVALAPPROVEDREJECTEDDEPRECATEDRegistry reads are sequential and bounded to 5 agents per call. Fallback to job row snapshot when registry is unreachable.
Live verification
Files changed
service/agent_intake_single/tools/postfab.py— switched toagent-registry-controlclient, usefiltersinstead of top-levelnameservice/agent_intake_single/tests/test_postfab_live_registry.py— updated Stubber + response fixtures toagent-registry-controlmodel; addedTestParamValidatorRejectsTopLevelName(validates built kwargs against real botocore model, proves old shape rejected / new shape accepted)Testing
test_postfab_live_registry.py— all pass (including 2 new ParamValidator tests)pytest service/ -v --tb=short— 466 passed, 0 failedDeployment
Services stack container rebuild required (Python source changed in
service/agent_intake_single/).