Skip to content

metrics: op=pin writes the flag the prompt reads - #35

Merged
mxfactorial merged 1 commit into
mainfrom
pin-query
Sep 20, 2026
Merged

mxfactorial merged 1 commit into
mainfrom
pin-query

Conversation

@mxfactorial

Copy link
Copy Markdown
Contributor

Closes the gap the tmp/057 coverage audit found: the prompt's dynamic tail reads pinned on a metric_queries row and no op set it.

  • manage_metrics op=pin {name, pinned}: one UpdateItem on the row; a canonical name is copied in first, so a pin never needs a prior query; 404 on an unknown name, 400 on a non-boolean pinned
  • the manage role gains dynamodb:UpdateItem on the schema table (per_customer shape change)
  • kb + AGENTS name the op; modules/agent's AGENTS names _queries_block() in the dynamic tail
  • test: pin sets the flag, unpin clears it, canonical pins on first use, the two refusals

bash scripts/test.sh --module metrics: 18 passed across 3 files

`_queries_block()` reads `pinned` on a `metric_queries` row and nothing
wrote it: `write_schema op=extend` saves a row's schema alone. The tool
gains `op=pin {name, pinned}`: one UpdateItem on the row, a canonical
name copied in first so a pin never needs a prior call, 404 on an
unknown name, 400 on a non-boolean. The manage role gains UpdateItem on
the schema table. modules/agent's AGENTS names the block in the dynamic
tail, which the #30 build left out.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mxfactorial
mxfactorial merged commit ae67e1d into main Sep 20, 2026
7 checks passed
@mxfactorial
mxfactorial deleted the pin-query branch September 20, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant