Skip to content

Live suite: plans, previews, tool drift and decoys against scute-api-v2 - #8

Merged
imit merged 1 commit into
mainfrom
live-enable-plans
Sep 29, 2026
Merged

imit merged 1 commit into
mainfrom
live-enable-plans

Conversation

@imit

@imit imit commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

The API now has plans, dry-run checks, tool reports and decoys (scute-api-v2 v26), so the live examples written in #7 run instead of being skipped. They check the answers' shapes against what the TypeScript harness expects. No SDK change; every answer matched.

What the examples check

  • Plan (run.request_plan, run.plan_status):
    • Two voids are filed and the answer has an id, status: "pending" and a say line.
    • Its steps carry permission, resource, details (the call's arguments) and needs: "approval".
    • One approval covers both steps. Each step runs once, and plan_status shows both as used.
    • A third call falls back to its own approval request, which the example denies so nothing is left pending.
  • Preview (run.preview):
    • A dry run answers like a check (a step-up here), and the real check still asks to verify.
    • Three previews on the agent that's already over its budget of 2 leave it active, so the dry run didn't count.
  • Tool drift (run.report_tools), on a fresh agent:
    • the baseline: {known: 1, new: [], changed: []};
    • the same report again: {known: 1, new: [], changed: []};
    • an added tool: {known: 1, new: ["void_invoice"], changed: []};
    • a changed description: {known: 0, new: [], changed: ["refund_invoice"]}.
  • Decoy (Scute::Guards.decoy), on a fresh agent: the call is refused (decoy_called, "I can't continue with this. A person will follow up."), the run closes, and Scute suspends the agent. The example then resumes it.

Results

  • bundle exec rake live against scute-api-v2 v26: 82 examples, 0 failures, 1 pending. The pending one is a skip: scute-ruby has no local decision engine for the policy snapshot.
  • Unit suite: 95 examples, 0 failures. RuboCop is clean.

Cleanup removes the drift and decoy agents with the rest. After the run the suite's app has no users, agents, properties or policy, its settings are back to their defaults, and no access request is left pending. Approved plans and used or denied requests stay, because the API has no way to delete them.

The API has them now (v26), so the examples run instead of being skipped,
and check the answers' shapes as the TypeScript harness expects them:

- A plan for two calls: its id, say line and steps (permission, resource,
  details, needs), approved once; each step runs once, the steps show as
  used, and the extra call's own approval request is denied so nothing is
  left pending.
- A preview answers like a check without using anything up: not a
  verification, and not the budget (previews on the agent already over its
  budget leave it active).
- Tool drift: the baseline, a repeat, a new tool, a changed one.
- A decoy call is refused, closes the run and pauses the agent.

82 examples, 0 failures, 1 pending (scute-ruby has no local decision engine).
@imit
imit merged commit 701ef70 into main Sep 29, 2026
3 checks passed
@imit
imit deleted the live-enable-plans branch September 29, 2026 04:20
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