Repository navigation
feat(action-center): turn on automatic execution, with a trail people can read - #835
Merged
Merged
Conversation
… can read Phase 7 shipped the mechanism and left the trigger unpulled. Pulling it needed one thing first, and it was not a waiting period. The runner recorded every attempt in `action_task_runs`, which has no interface, and nothing in `action_events`, which is what the drawer's History tab shows. So a task the product carried out for itself looked exactly like one a colleague had done: marked complete, no trail, nobody to ask. That is worse than not automating it, and it was the real blocker rather than the two clean nights I had asked for — both tools only read, so the risk was never damage, it was a user seeing work they could not account for. The runner now writes to both. Three events, for the three things a user needs to know: it ran and with what, the attempt failed and the step needs doing by hand, or it is waiting for their approval to reach outside Ansvisor. A task blocked because no tool implements it yet, or because it waits on another task, stays out of the trail — that is operational detail, it is in the audit table, and it would be noise in a list people read to understand their own work. `actor_id` stays null, which is already how the nightly engine's own events are recorded: null means the product did it. With that, the nightly sweep is wired up. Bounded by a ceiling of 50 attempts a night across every brand: the cost of a misfiring detector here is third-party requests rather than damage, but it should not become a thousand of them before anyone is awake. Seven brands have analytics connected and an action carries at most two tool-backed tasks, so a normal night is far under it — reaching it is a signal in itself and the sweep says so. Also: `backfill-signals.js` now goes through `runSignalPass` rather than calling the recorder and generator itself. Running it by hand this morning recovered a brand's week of missed signals but wrote no ledger row, so `signal_runs` claimed the pass had not run when it had — unreliable at exactly the question it was added to answer. 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 shipped the mechanism and left the trigger unpulled. Pulling it needed
one thing first, and it was not a waiting period.
The actual blocker
The runner recorded every attempt in
action_task_runs, which has nointerface, and nothing in
action_events, which is what the drawer's Historytab shows. So a task the product carried out for itself looked exactly like one
a colleague had done: marked complete, no trail, nobody to ask.
That is worse than not automating it — and it was the real blocker rather than
the two clean nights I had asked for. Both shipped tools only read, so the risk
was never damage; it was a user seeing work they could not account for. I had
the wrong reason for waiting.
Three events, for three things a user needs to know
task_rantask_run_failedtask_awaiting_approvalA task blocked because no tool implements it yet, or because it waits on
another task, stays out of the trail. That is operational detail, it is already
in the audit table, and it would be noise in a list people read to understand
their own work.
actor_idstays null, which is already how the nightly engine's own events arerecorded: null means the product did this, not a person.
The task is named in the reader's language and the tool by its id — the id is
the audit fact, so it is not translated. A task this build has no copy for is
humanised rather than shown as a key.
A trail that fails to write does not fail a completed run: the audit row is
already there and the task's status is the fact that matters.
With that, the sweep is on
sweepTaskExecutionruns nightly, after the signal catch-up so tonight'sactions exist before anything works on them. Bounded at 50 attempts a night
across every brand: the cost of a misfiring detector here is third-party
requests rather than damage, but it should not become a thousand of them before
anyone is awake.
Sized from what exists — seven brands have analytics connected and an action
carries at most two tool-backed tasks — so a normal night is far under it.
Reaching it is a signal in itself and the sweep logs a warning.
Merging this turns automatic execution on. Fourteen agent-mode tasks still
have no tool, so tonight's sweep will attempt only
validateandmeasure_traffic_impact.Also
backfill-signals.jsnow goes throughrunSignalPassrather than calling therecorder and generator itself. Running it by hand this morning recovered a
brand's week of missed signals but wrote no ledger row, so
signal_runsclaimed the pass had not run when it had — unreliable at exactly the question
it was added to answer.
Related issue
Refs #818
Type of change
feat— New featureHow to test
After the next nightly run, an action whose
validatetask ran shows acarried out automatically entry in its History tab, and
action_task_runsholds the input and output behind it.
No migration.
Checklist
feature/)yarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)🤖 Generated with Claude Code
https://claude.ai/code/session_01SQ2H6mSd9JDpmqonk2VWBj