Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .agents/skills/quota-array-dispatch/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Deterministic shell owns only schema, configuration, and version validation plus
## Collect facts

Run `quota-axi --json` once per intake and reuse that snapshot for every candidate.
Do not take a second snapshot to settle a candidate, and read `quota-axi auth --json` when a candidate's credential surface is in question.
Do not take a second snapshot to settle a candidate.
For each candidate, preserve explicit `harness`, `model`, and `provider`; `harness-adapters` owns identity, and model/provider never infer harness:

- task/profile fit and required reasoning class
Expand Down Expand Up @@ -99,5 +99,6 @@ Never use pace or raw headroom to silently replace that reasoning class.
Report duplicate concrete profiles as a configuration error.

Account for every candidate visibly before selecting or escalating, naming its catalog evidence, provider relation, applicable quota and authentication facts, remaining uncertainty, fit and reasoning class, and pace and headroom.
After selecting, check auth only through that tuple's surface; another harness CLI cannot block it.
A blocked credential report must name `harness`, `model`, authentication surface, and concrete failure evidence; never emit a bare `Grok unauthenticated` statement.
Never conclude with an unexplained "best quota" label.
29 changes: 29 additions & 0 deletions tests/fm-bearings-snapshot.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1889,6 +1889,35 @@ EOF
pass "main and secondmate captain actionability use the same blocker readiness"
}

# The /bearings skill is the one owner of the four-section chat-response contract.
# Assert it states exactly the four fixed sections in order, each with its explicit
# empty-state sentence, documents the At Anchor exclusion, and keeps file-mode links
# inside the four-section digest.
test_chat_contract_four_sections() {
local skill body headings report_headings expected
skill="$ROOT/.agents/skills/bearings/SKILL.md"
[ -f "$skill" ] || fail "bearings SKILL.md missing at $skill"
body=$(awk '/^## Chat-response contract$/{capture=1; next} capture && /^## /{exit} capture' "$skill")
headings=$(printf '%s\n' "$body" | sed -nE "s/^[0-9]+\. \*\*([^*]+)\*\*.*/\1/p")
expected=$(printf '%s\n' "Captain's Call" "Recently Landed" "Underway" "Charted Next")
[ "$headings" = "$expected" ] || fail "chat contract must contain exactly four numbered sections in fixed order, got: $headings"
assert_contains "$body" "Nothing needs your action right now" "Captain's Call empty-state sentence"
assert_contains "$body" "No recent completions are in the current baseline" "Recently Landed empty-state sentence"
assert_contains "$body" "Nothing is underway" "Underway empty-state sentence"
assert_contains "$body" "Nothing is queued" "Charted Next empty-state sentence"
Comment on lines +1904 to +1907

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Match the complete empty-state sentences.

The contract defines exact sentences, including the final period. These assert_contains calls check only substrings. A changed sentence can retain the substring and still pass. Use an exact-line check for each Empty-state: "..." entry.

Proposed fix
-  assert_contains "$body" "Nothing needs your action right now" "Captain's Call empty-state sentence"
+  printf '%s\n' "$body" | grep -Eq '^[[:space:]]*Empty-state: "Nothing needs your action right now\."$' \
+    || fail "Captain's Call empty-state sentence"
-  assert_contains "$body" "No recent completions are in the current baseline" "Recently Landed empty-state sentence"
+  printf '%s\n' "$body" | grep -Eq '^[[:space:]]*Empty-state: "No recent completions are in the current baseline\."$' \
+    || fail "Recently Landed empty-state sentence"
-  assert_contains "$body" "Nothing is underway" "Underway empty-state sentence"
+  printf '%s\n' "$body" | grep -Eq '^[[:space:]]*Empty-state: "Nothing is underway\."$' \
+    || fail "Underway empty-state sentence"
-  assert_contains "$body" "Nothing is queued" "Charted Next empty-state sentence"
+  printf '%s\n' "$body" | grep -Eq '^[[:space:]]*Empty-state: "Nothing is queued\."$' \
+    || fail "Charted Next empty-state sentence"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
assert_contains "$body" "Nothing needs your action right now" "Captain's Call empty-state sentence"
assert_contains "$body" "No recent completions are in the current baseline" "Recently Landed empty-state sentence"
assert_contains "$body" "Nothing is underway" "Underway empty-state sentence"
assert_contains "$body" "Nothing is queued" "Charted Next empty-state sentence"
printf '%s\n' "$body" | grep -Eq '^[[:space:]]*Empty-state: "Nothing needs your action right now\."$' \
|| fail "Captain's Call empty-state sentence"
printf '%s\n' "$body" | grep -Eq '^[[:space:]]*Empty-state: "No recent completions are in the current baseline\."$' \
|| fail "Recently Landed empty-state sentence"
printf '%s\n' "$body" | grep -Eq '^[[:space:]]*Empty-state: "Nothing is underway\."$' \
|| fail "Underway empty-state sentence"
printf '%s\n' "$body" | grep -Eq '^[[:space:]]*Empty-state: "Nothing is queued\."$' \
|| fail "Charted Next empty-state sentence"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/fm-bearings-snapshot.test.sh` around lines 1904 - 1907, Update the four
empty-state assertions in the snapshot test to validate the complete exact line,
including the final period, rather than matching partial substrings. Use the
existing body-checking utilities or exact-line assertion pattern for the entries
associated with “Captain's Call,” “Recently Landed,” “Underway,” and “Charted
Next,” while preserving their expected sentences.

report_headings=$(sed -nE 's/^ - \*\*(Captain.s Call|Recently Landed|Underway|Charted Next)\*\*.*/\1/p' "$skill")
[ "$report_headings" = "$expected" ] || fail "detailed report contract must contain the same four complete sections, got: $report_headings"
Comment on lines +1908 to +1909

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Reject unrecognized report headings.

The sed expression selects only the four expected names. It drops every other indented bold heading before the equality check. If .agents/skills/bearings/SKILL.md contains At Anchor, report_headings can still equal expected, even though the contract forbids that section. Capture every heading in the detailed-report block before comparing the complete list.

Proposed fix
-  report_headings=$(sed -nE 's/^   - \*\*(Captain.s Call|Recently Landed|Underway|Charted Next)\*\*.*/\1/p' "$skill")
+  report_headings=$(sed -nE 's/^   - \*\*([^*]+)\*\*.*/\1/p' "$skill")
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
report_headings=$(sed -nE 's/^ - \*\*(Captain.s Call|Recently Landed|Underway|Charted Next)\*\*.*/\1/p' "$skill")
[ "$report_headings" = "$expected" ] || fail "detailed report contract must contain the same four complete sections, got: $report_headings"
report_headings=$(sed -nE 's/^ - \*\*([^*]+)\*\*.*/\1/p' "$skill")
[ "$report_headings" = "$expected" ] || fail "detailed report contract must contain the same four complete sections, got: $report_headings"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/fm-bearings-snapshot.test.sh` around lines 1908 - 1909, Update the
report_headings extraction in the detailed-report contract test to capture every
indented bold heading, not just the four recognized names, then compare that
complete heading list with expected so unrecognized sections such as “At Anchor”
cause the assertion to fail.

grep -Eq 'since the (prior|last) report|Nothing has landed since|unchanged delta' "$skill" \
&& fail "bearings contract still contains prior-report delta wording"
# shellcheck disable=SC2016 # Backticks are literal Markdown in the expected text.
assert_contains "$(cat "$skill")" 'Never read an earlier `data/status-report-*.md`' "prior reports must not influence current output"
assert_contains "$(cat "$skill")" "bounded current recent-completions baseline" "Recently Landed must be a current baseline"
assert_contains "$body" "no At Anchor section" "the At Anchor exclusion must be documented"
assert_contains "$body" "materially shorter" "the file-mode chat must be materially shorter than the report file"
assert_contains "$body" "report path or link" "file mode must link the report from inside the digest"
pass "the /bearings skill states the four-section chat contract in order, with empty-states and the At Anchor exclusion"
}
test_chat_contract_four_sections
test_domain_alpha_stale_parent_event_does_not_become_current_work
test_gnu_stat_uses_file_formats_without_bsd_fallback_pollution
test_parent_activity_evidence_is_bounded_and_disclosed
Expand Down
Loading