Assert a property rather than the loader against itself #1390
No reviewers
Labels
No labels
burndown-2026-06
burndown-2026-08
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/advocate
role/director
role/exec
role/frontend
role/gamedev
role/human
role/platform
role/qa
role/science
role/sysadmin
state
ambient
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/agentic-os!1390
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/claude/ee98-loader"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes
#1180.The tautology
wantcomes fromloadConfiguredHarnessLaunchProfiles(), and so doesgot, through the same map lookup. The loop isx == xand could only fail if two consecutive loads disagreed.Why the obvious repair is closed
The test's own comment names the constraint:
That is the house rule against tests encoding configuration, and it rules out hardcoding expected agents. So the fix is not "assert the real values", it is "assert something the loader can violate".
Every configured role must resolve without error and to a non-empty agent. Value resolution already has honest cover in the two sibling tests, which swap in a synthetic profile document and assert against fixture values (
goose,opencode) rather than against real config.Proved it can fail
The point of this milestone is checks that pass without binding, so an assertion added here has to earn it. Mutating the resolver's success return to an empty string:
Reverted, green again. The old assertion survives that same mutation, which is the defect.
Scope
One test file, no production change. The
len(document.DefaultAgents) == 0guard and the three negative cases ("",bad/role,story-architect) are untouched and were always real.TestStandaloneDefaultAgentForRole's positive path compared standaloneDefaultAgentForRole(role) with document.DefaultAgents[role]. Both sides are the same map lookup through the same loader, so the loop reduced to `x == x` and could only fail if two consecutive loads disagreed. The test's own comment names the constraint that produced it: resolution is the behavior under test, and naming agent values here would restate config. That rules out the obvious repair. It resolves by asserting a property the loader can actually violate. Every configured role must resolve without error and to a non-empty agent. Value resolution already has honest cover in the two sibling tests, which swap in a synthetic profile document and assert against fixture values rather than real config. Proved the new assertion can fail rather than assuming it. Mutating the resolver's success return to an empty string: --- FAIL: TestStandaloneDefaultAgentForRole standaloneDefaultAgentForRole(frontend) resolved to an empty agent Reverted, green again. A test in this milestone earns its place by failing when the thing it guards breaks, so it was worth spending the mutation to see it. Refs coilyco-flight-deck/agentic-os#1180 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: Kai Siren <coilysiren@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Agent-Role: platform