test(capability): tie capability.md's numbers to the code #248
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!248
Loading…
Reference in a new issue
No description provided.
Delete branch "test/capability-doc-matches-code"
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?
Tests only, no behavior change. Follows the capability work in
dd76224andf34d0b4.Why
references/capability.mdis loaded into the prompt and tells the model what the service can do. The model then repeats it to members. Every number in it — six tool rounds, the seventh failing, 1800 characters, twelve messages — is prose mirroring a value defined somewhere else.Nothing binds them. Change
maxToolRounds, and the doc keeps confidently telling the model the old ceiling, which the model states to a member as fact. That is precisely the failure class the file was written to prevent, arriving through the file itself.What this adds
internal/community/capabilitydoc_test.go— four tests binding the doc to its sources:…RealToolRoundCeilingmaxToolRounds…RealReplyCapParseReplybehavior at 1800 and 1801 runes…RealContextWindowagent/*.yaml…DoesNotDenyWorkTheHarnessCanRunJobKindssetThe reply cap is asserted through
ParseReplyrather than a constant, because the limit is a literal in that function and behavior is what the member actually meets.The last one is the interesting guard: "Nothing runs between requests" is true today only because
JobKindscontains justechoandward-exec, and neither deployment configures a job store. Add a third kind that outlives a reply and the doc becomes a false denial — that test fails when someone does.Verified by mutation
Every assertion was checked by breaking the thing it guards:
maxToolRounds6 → 5does not say "five tool rounds"maxToolRounds6 → 7does not name "on the eighth"a reply of exactly 1800 runes was rejectedmax_context_messages12 → 10does not say "ten recent channel messages"One of these caught nothing on the first attempt.
strings.Contains(doc, "ten")passed against unmodified prose, because "ten" is a substring of "softening". Number words are now matched as phrases, and the tool-round ordinal with them. Worth stating because it is the same defect in miniature that this PR guards against — an assertion that reads as a check and verifies nothing.Verification
go vet,gofmt, fullgo test ./..., andpre-commit run --filesall clean.I did not edit
capability.md. I checked every claim in it against source and found no inaccuracy — the six-round ceiling, the fail-fast sequential tool loop, the 1800 cap, the twelve-message window, and the attribution of Eco watchers to the Eco application are all correct as written. This PR keeps them that way.Quail (QA)