Repository navigation
feat(action-center): carry out a task through a tool, with a record of it - #833
Merged
Merged
Conversation
…f it Phase 5 marked every task with who could carry it out and whether carrying it out reaches outside Ansvisor. Nothing acted on either. This is the layer that does, under four rules: Nothing reaches outside except through a tool. The registry is the enumerable surface, and arguments are built from the action's own payload — no query, no URL and no property id comes from anywhere a model could reach, the same rule the analytics sync already follows and the reason this layer can be audited. Nothing changes outside Ansvisor without approval. A tool that writes to a third-party system is blocked until a person authorises that task, and the authorisation is recorded on the task rather than inferred from whoever triggered the run. Reading a system the brand connected is not a change and needs no approval: asking for one before every read teaches people to approve blindly. No shipped tool writes externally yet, so the gate currently holds nothing back — it is enforced and tested now rather than written later under deadline. Every attempt is recorded: inputs, the tool, its result, any error. Never the model's reasoning. That is not evidence, it is not reliable as explanation, and storing it invites people to read it as both. Anything a run wants to claim it claims in `output`, where the next task reads it. A failed run fails its task, not its action. A tool that throws costs one step; the action stays open and somebody does that step by hand. Two tools ship. `visibility_window` reads our own rollups; `ga_traffic_window` reads the brand's analytics property through the connection they authorised — live rather than from `ga_page_stats`, because that table stores the top pages of each day and truncates, which is the right trade for a dashboard and the wrong one for a measurement of specific pages. Verified against production: the analytics tool returned 748 sessions against 722 the week before, across 199 pages, in 2.5s. Fourteen agent-mode tasks still have no tool. The runner says so by name rather than improvising, which is the difference between an honest gap and a silent one. Deliberately not wired to the nightly cron. The engine that produces these tasks spent six days failing silently before anyone noticed (#829); an execution layer that runs unattended belongs after the verification that the thing it executes for is running at all. `src/scripts/run-action-task.js` invokes it deliberately, and `--dry` reports why a task would not run. Refs #818 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01SQ2H6mSd9JDpmqonk2VWBj
33 of 37 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 7 of #818, the last one. Phase 5 marked every task with who could carry
it out and whether carrying it out reaches outside Ansvisor; nothing acted on
either. This is the layer that does.
Four rules
Nothing reaches outside except through a tool. The registry is the
enumerable surface. Arguments are built from the action's own payload — no
query, no URL and no property id comes from anywhere a model could reach. The
analytics sync already works this way; it is the reason this layer can be
audited at all.
Nothing changes outside Ansvisor without approval. A tool that writes to a
third-party system is blocked until a person authorises that task, and the
authorisation is recorded on the task rather than inferred from whoever
triggered the run. The task also moves to
waiting_approval, so the personwho has to decide can find it without reading a log.
Reading a system the brand connected is not a change and needs no approval.
Requiring one before every read teaches people to approve without looking,
which is how an approval step stops being one.
Every attempt is recorded — inputs, tool, result, error — and never the
model's reasoning. That is not evidence, it is not reliable as explanation,
and storing it invites people to read it as both. Anything a run wants to
claim it claims in
output, where the next task reads it.A failed run fails its task, not its action. A tool that throws costs one
step. The action stays open, the other tasks stay as they were, and somebody
does that step by hand.
The exit condition, against production
Both tools run read-only, so they were exercised directly against the live
database and a live integration:
The second is the one the phase is about: it reaches the brand's own
Analytics property through the connection they authorised, via the Composio
toolkit, and returns a before/after measurement. It reads live rather than
from
ga_page_statsbecause that table stores the top pages of each day andsays so when it truncates — the right trade for a dashboard, the wrong one
for a measurement of specific pages, where a page outside the ceiling would
report zero sessions rather than none.
Honest gaps
Fourteen agent-mode tasks still have no tool. The runner names the
missing one rather than improvising, which is the difference between an
honest gap and a silent one. Tools arrive the way detectors and definitions
did — as each one is worth building.
No shipped tool writes externally, so the approval gate currently holds
nothing back. It is enforced and tested now, against a stand-in tool, rather
than written later under deadline against a real one.
No model in the loop. Both tools are deterministic. The runner, the
audit trail and the approval gate are what a model-driven tool would need
before it could be added, and they exist now; adding one is a smaller change
than building this was.
Deliberately not on the cron
The engine that produces these tasks spent six days failing silently before
anyone noticed (#829). An execution layer that runs unattended belongs after
the verification that the thing it executes for is running at all — which is
tomorrow morning, on the first clean nightly run.
src/scripts/run-action-task.js <taskId>invokes it deliberately;--dryreports why a task would not run without running it, which is theuseful half when the question is "why has this task not moved".
Related issue
Refs #818
Type of change
feat— New featureHow to test
Migration
00090is applied to the hosted database.action_task_runsisservice-role only with no policies;
action_tasksgainsapproved_byandapproved_at, both null on every existing row.Checklist
feature/)yarn lintpassesyarn format:checkpasses🤖 Generated with Claude Code
https://claude.ai/code/session_01SQ2H6mSd9JDpmqonk2VWBj