Repository navigation
fix(skills): the AWS skill asserted absences that had stopped being true - #694
Conversation
45b7daf to
272eb6e
Compare
Two notes from driving this to green1. CI caught a The new absence loop was written as Two things worth knowing for the next person:
2. One audit finding is deliberately left open. The audit found Worth doing as its own change, by whoever owns that description's content budget. |
`aws-account-operations` carried four "this does not exist" claims that the Terraform had already contradicted. The alerting and cost-analytics stacks landed; the prose did not follow: - "Zero dashboards, zero metric alarms, zero metric filters, zero SNS topics" against three `aws_cloudwatch_metric_alarm`, an `aws_sns_topic` and an email subscription, with all three alarms routing to that topic. - "There is no ... Athena, Glue ... SNS ..." in `footprint.md`, nine lines above its own generated block listing an Athena workgroup, a Glue database and a Glue table. - "The engine does not use `aws-sdk-s3`", and a hand-copied three-crate `toml` block naming `aws-sdk-s3` as a future addition, against a fourth declaration in `er-server` driving the dropped-object ingestion poller. - An evals maintainer's note asserting the workspace "carries no `kube` or `k8s-openapi` dependency", against the `er-k8s` crate that pins both and renders the per-attempt Job manifest the dispatcher watches. Every one is an asserted ABSENCE, which is the one claim the thing it describes cannot falsify: a stale positive gets noticed when someone opens the resource, a stale negative only by a reader who already knew better. Two of the four were also load-bearing — the skill told a session that "proposing a dashboard or alarm is adding the first one, not extending a set", and that budget email was the entire alerting surface. So the fix is a generator, not three sentences. `gen_aws_footprint` now emits the absences as a SET DIFFERENCE over a candidate service list, plus a derived alerting-surface table. A service adopted later drops off the list on the next regeneration with nobody editing anything — the `screens-coverage` shape docs/agent-skills.md recommends. Athena, Glue, SNS and metric alarms dropped off on the first run; dashboards and metric filters correctly remain. Also from the same audit: - Both-ways routing added where this skill named a neighbour that stayed silent. `rust-conventions` claims "the TLS/AWS feature pins" verbatim and neither description named the other; same for `ci-and-supply-chain` and the account CI pushes into, and `ducklake-lakehouse` and the static lake key. - The quota section no longer states an applied vCPU value. It had been wrong in both directions — asserting a requested figure as granted off a `CASE_CLOSED` case, then asserting a specific lower one — so the arithmetic is now a worked example conditioned on reading the value, and the eval credits reaching for `get-service-quota` rather than any number. - Dropped the body's duplicate permission-set table, the hand-copied SDK version pins, the restated MSRV, the enumerated MCP tool list, and three of the four copies of the expired-SSO-token remedy. The Budgets are deliberately NOT repointed at the SNS topic — Budgets is served from us-east-1 and a CloudWatch alarm can only publish to a topic in its own region — so that reads as two notification paths sharing one subscriber, which is what the body now says. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`agent skills (lint + drift)` failed on the new `gen_aws_footprint` absence loop: `printf '%s\n' "$declared" | grep -qE "^($pattern)"`. `scripts/ci/skills-check-test.sh` greps this file for that shape and fails on a reintroduction, which is exactly what it caught. `grep -q` exits the instant it matches, closing the pipe while the writer is still producing; the writer takes SIGPIPE and under `pipefail` the pipeline returns 141 — so a service that IS declared would report as absent. That is the precise inversion the absence list exists to prevent, which makes the shape worth rejecting even where it cannot currently fire: `$declared` is a few dozen lines here, so the writer always wins today. Replaced with the captured-then-matched `grep -c` form the repo prescribes (`-c` drains its input). The regenerated block is byte-identical, so the `HEAD`-relative drift check confirms the refactor changed no output. Two notes for the next person, both learned the hard way here: - `make skills-check` does **not** run this guard — it lives in `scripts/ci/` and is wired only into `rust.yml`'s skills job, so the local gate passes clean and only CI catches the reintroduction. - The guard is a plain text grep over the whole file, so it fires on a **comment** carrying the literal sequence too. The fix's own explanatory comment turned the suite red a second time until reworded. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
272eb6e to
5fb7786
Compare
…ator it is good for #694 left a note promising this: scenario 3's run-shaped wording ("a 10M-row run has been Pending for twenty minutes") was retired in 2026-10 as unanswerable, on the grounds that there was no per-run pod and no `kube` dependency in the workspace. `er-k8s` now pins `kube` and `k8s-openapi`, renders a per-attempt Job manifest, and the dispatcher watches it, so the ground is gone. Restored as scenario 4 rather than as a replacement, because the NodePool phrasing in scenario 3 tests the same quota knowledge without depending on the orchestration shape — that is what makes it the durable one. What the run-shaped wording is actually good for is a discrimination the NodePool wording cannot ask for. Reading `er-k8s/src/classify.rs`, **two unrelated causes both end in `PreStartVerdict::CapacityWait`**: - an account EC2 vCPU ceiling — the NodeClaim cannot place, the pod is `Unschedulable`, NodeClaims churn; - a Kubernetes `ResourceQuota` on the namespace — the controller's own message carries `exceeded quota` and no NodeClaim is attempted at all. Different layers, non-overlapping remedies. So the scenario's query names the wrong one on purpose ("the namespace has a ResourceQuota — did we undersize it?") and the must-list is to separate them; accepting the premise is the miss. Credit items are drawn from the same source rather than invented: that twenty minutes is past the unschedulable bound so a capacity wait should already be on the `task_instance` row (`executor.rs:819` → `task_instance::update::capacity_wait`), and that a capacity wait spends no launch because "a starved account is the operator's problem, never the tenant's". Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…ference Found sweeping my own #694 change. `gen_aws_footprint` derives "services with nothing declared" by matching a hand-maintained candidate list against the `resource "aws_*"` types in `infra/terraform`. The candidate list is the only input a human edits, so it is the only place a typo can hide — and the failure is **silent**: a pattern that matches nothing reports its service as absent, and the drift check sees a perfectly self-consistent file. That is the shape of the bug the generator was written to retire. The skill asserted "there is no ... Athena, Glue ... SNS ..." while all three were declared, and nothing caught it for weeks because an asserted absence is the one claim the thing it describes cannot falsify. Deriving the list removed the stale-prose failure but left this one. Two assertions, neither hard-coding which services exist today: - every alternation is a well-formed `aws_*` resource-type prefix; - the set difference holds **both ways** — a candidate whose pattern matches a declared type must not be on the absence list, and one that matches nothing must be. Both mutation-tested, since this suite's own standard is that a test which cannot distinguish the fix from the bug proves nothing: - `Lambda|aws_lambda_` -> `ws_lambda_` fires the shape assertion only; - `SNS|aws_sns_` -> `aws_snsX_` (a present service whose pattern stops matching) fires the both-ways assertion only, reporting `[SNS absent but not listed]`. Each mutation was confirmed applied before running, and the file restored after; the suite returns to all-green on revert. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
`make skills-check` passed clean on #694 while CI's skills job failed, because `scripts/ci/skills-check-test.sh` was wired only into `rust.yml`. The local gate could not see a piped `grep -q` that the self-test exists to reject, so the shape error cost a full CI cycle to learn about — in a job that is not even a required check. This is the one `scripts/ci/*-test.sh` that belongs in a make target, and the distinction is not special-casing: it tests the very script this target runs, and it is pure bash with no toolchain, no cluster and no cloud credentials. `tf-helpers-test.sh` needs terraform and `kind-assertions-test.sh` needs a cluster, which is why those stay CI-only. Ordered first because the self-test is sub-second and checks the gate itself — no reason to pay the regen to find out the gate is malformed. Two consequences worth recording, both surfaced by the gate rather than by me: - `rust-conventions/references/gates.md` carries a GENERATED block deriving each make target's command from the Makefile, so this edit made it stale and `skills-check` failed on its own drift check. The regenerated block is included here, which is the whole point of that gate. - That generator renders a multi-line recipe as `a; b`, which reads as "b runs even if a fails" — false for make, which stops at the first failing line. So the recipe is **one** line with `&&`, making the fail-fast explicit in the generated doc instead of only in make's semantics. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
… I dropped (#712) * test(skills): restore the run-shaped quota scenario, as the discriminator it is good for #694 left a note promising this: scenario 3's run-shaped wording ("a 10M-row run has been Pending for twenty minutes") was retired in 2026-10 as unanswerable, on the grounds that there was no per-run pod and no `kube` dependency in the workspace. `er-k8s` now pins `kube` and `k8s-openapi`, renders a per-attempt Job manifest, and the dispatcher watches it, so the ground is gone. Restored as scenario 4 rather than as a replacement, because the NodePool phrasing in scenario 3 tests the same quota knowledge without depending on the orchestration shape — that is what makes it the durable one. What the run-shaped wording is actually good for is a discrimination the NodePool wording cannot ask for. Reading `er-k8s/src/classify.rs`, **two unrelated causes both end in `PreStartVerdict::CapacityWait`**: - an account EC2 vCPU ceiling — the NodeClaim cannot place, the pod is `Unschedulable`, NodeClaims churn; - a Kubernetes `ResourceQuota` on the namespace — the controller's own message carries `exceeded quota` and no NodeClaim is attempted at all. Different layers, non-overlapping remedies. So the scenario's query names the wrong one on purpose ("the namespace has a ResourceQuota — did we undersize it?") and the must-list is to separate them; accepting the premise is the miss. Credit items are drawn from the same source rather than invented: that twenty minutes is past the unschedulable bound so a capacity wait should already be on the `task_instance` row (`executor.rs:819` → `task_instance::update::capacity_wait`), and that a capacity wait spends no launch because "a starved account is the operator's problem, never the tenant's". Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * test(skills): assert the aws-footprint absence list is a real set difference Found sweeping my own #694 change. `gen_aws_footprint` derives "services with nothing declared" by matching a hand-maintained candidate list against the `resource "aws_*"` types in `infra/terraform`. The candidate list is the only input a human edits, so it is the only place a typo can hide — and the failure is **silent**: a pattern that matches nothing reports its service as absent, and the drift check sees a perfectly self-consistent file. That is the shape of the bug the generator was written to retire. The skill asserted "there is no ... Athena, Glue ... SNS ..." while all three were declared, and nothing caught it for weeks because an asserted absence is the one claim the thing it describes cannot falsify. Deriving the list removed the stale-prose failure but left this one. Two assertions, neither hard-coding which services exist today: - every alternation is a well-formed `aws_*` resource-type prefix; - the set difference holds **both ways** — a candidate whose pattern matches a declared type must not be on the absence list, and one that matches nothing must be. Both mutation-tested, since this suite's own standard is that a test which cannot distinguish the fix from the bug proves nothing: - `Lambda|aws_lambda_` -> `ws_lambda_` fires the shape assertion only; - `SNS|aws_sns_` -> `aws_snsX_` (a present service whose pattern stops matching) fires the both-ways assertion only, reporting `[SNS absent but not listed]`. Each mutation was confirmed applied before running, and the file restored after; the suite returns to all-green on revert. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * build(skills): run the skills self-test from make skills-check `make skills-check` passed clean on #694 while CI's skills job failed, because `scripts/ci/skills-check-test.sh` was wired only into `rust.yml`. The local gate could not see a piped `grep -q` that the self-test exists to reject, so the shape error cost a full CI cycle to learn about — in a job that is not even a required check. This is the one `scripts/ci/*-test.sh` that belongs in a make target, and the distinction is not special-casing: it tests the very script this target runs, and it is pure bash with no toolchain, no cluster and no cloud credentials. `tf-helpers-test.sh` needs terraform and `kind-assertions-test.sh` needs a cluster, which is why those stay CI-only. Ordered first because the self-test is sub-second and checks the gate itself — no reason to pay the regen to find out the gate is malformed. Two consequences worth recording, both surfaced by the gate rather than by me: - `rust-conventions/references/gates.md` carries a GENERATED block deriving each make target's command from the Makefile, so this edit made it stale and `skills-check` failed on its own drift check. The regenerated block is included here, which is the whole point of that gate. - That generator renders a multi-line recipe as `a; b`, which reads as "b runs even if a fails" — false for make, which stops at the first failing line. So the recipe is **one** line with `&&`, making the fail-fast explicit in the generated doc instead of only in make's semantics. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(skills): the Pending trap named one cause when the code classifies two Surfaced by verifying the scenario added two commits ago, which is the point of writing evals against a real failure. The new scenario's must-list asks a reader to separate an account vCPU ceiling from a namespace `ResourceQuota` — and `ResourceQuota` appeared nowhere in this skill. `infra-platform` owns that concept, so the scenario required knowledge the skill did not carry. The gap is in the skill, not the test. The body asserts **"A pod stuck `Pending` with no scheduling event is this, until proven otherwise"** and then never says what the other candidate is, so the trap over-triggers: every `Pending` pod reads as a quota increase request. `er-k8s/src/classify.rs` already distinguishes them, and the discriminator is sharper than the symptom: - a pod that **exists** and is `Unschedulable`, with NodeClaims appearing and being torn down → the account ceiling; - **no pod at all**, `active == 0`, and a `FailedCreate` Event carrying `exceeded quota` → the namespace `ResourceQuota`, charged at admission so the Job controller never creates one. Both land the same `PreStartVerdict::CapacityWait`, which spends no launch, so the verdict cannot tell them apart — only the evidence underneath it can. That is now a table in the trap section, with the `ResourceQuota` column routed to `infra-platform`. The eval's wording is corrected to match the source in the same commit: it said "no NodeClaim is attempted", which is a consequence rather than the condition the code tests. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: bmoore813 <[email protected]> Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Found by
/skill-auditonaws-account-operations. Four of the skill's"this does not exist" claims had been contradicted by the Terraform since the
alerting and cost-analytics stacks landed.
What was wrong
aws_cloudwatch_metric_alarm, oneaws_sns_topic+ email subscription, all three alarms routing to that topicfootprint.mdaws-sdk-s3" + a hand-copied three-cratetomlblock naming it as a future additioner-serverdrives the dropped-object ingestion poller (s3_ingest.rs)kubeork8s-openapidependency"er-k8spins both and renders the per-attempt Job manifest the dispatcher watchesTwo were load-bearing rather than merely stale: the skill told a session that
"proposing a dashboard or alarm is adding the first one, not extending a set",
and that budget email was the entire alerting surface.
Why a generator instead of three corrected sentences
Every one of them is an asserted absence, which is the one claim the thing it
describes cannot falsify. A stale positive gets noticed the moment someone opens
the resource; a stale negative is only caught by a reader who already knew
better — so correcting the sentences buys nothing structural.
gen_aws_footprintnow emits the absences as a set difference over acandidate service list, plus a derived alerting-surface table. A service adopted
later drops off the list on the next regeneration with nobody editing anything,
which is the
screens-coverageshapedocs/agent-skills.mdrecommends. On thefirst run Athena, Glue, SNS and metric alarms dropped off; dashboards and metric
filters correctly remain.
Gate observed failing, per the repo rule that a gate is not trusted until
seen red: adding a throwaway
aws_lambda_functionto the Terraform made thecommitted list stale and the drift check reported
- Lambdaand failed. That isthe real mechanism — a source change making committed output wrong, not a
hand-edited block.
Also from the audit
rust-conventionsclaims "the TLS/AWS feature pins" nearly verbatim andneither description named the other; same for
ci-and-supply-chain(theaccount CI pushes into) and
ducklake-lakehouse(the static lake key).One-way routing loses to the incumbent.
in both directions — asserting a requested figure as granted off a
CASE_CLOSEDcase, then asserting a specific lower one. The arithmetic is nowa worked example conditioned on reading the value, and the eval credits
reaching for
get-service-quotarather than any particular number.pins, the restated MSRV, the enumerated MCP tool list, and three of the four
copies of the expired-SSO-token remedy.
One nuance the Terraform settled: the Budgets are deliberately not repointed
at the SNS topic, because Budgets is served from
us-east-1while a CloudWatchalarm can only publish to a topic in its own region. So it is two notification
paths sharing one subscriber, which is what the body now says.
Gate
make skills-checkgreen — regen current, 23 skills linted, 3 overrides checked.No Rust or frontend change.
🤖 Generated with Claude Code