Repository navigation
feat(action-center): keep what became of an action's signals with its measured result (learning A3) - #1687
Merged
gkhngyk merged 1 commit intoOct 28, 2026
Conversation
… measured result Learning phase A, A3 (the agentic learning report, gaps 2 and 4). An action's result compared its metrics before and after, but never asked the question closest to its own aim: did the signals that raised it end? Signals close as resolved (the condition gone) or resolved with `supersededBy` (still there, as another kind), and that never reached the outcome. - validate.js: when an action is measured, signalOutcome reads its signals through action_signals and keeps the counts in `validation.signals`: total, ended, replaced, dismissed, open. An action with no metric to measure keeps them too (its validation was null). An action no signal raised (sent from Content, Insights…) has none. - History's drawer says it under Result: "Of the 4 signals that raised it, when measured: 2 ended, 1 turned into another, 1 still open." - The Action Center guide says so. The outcome itself is unchanged; A4 decides what counts as improved. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
gkhngyk
approved these changes
Oct 28, 2026
gkhngyk
left a comment
Contributor
There was a problem hiding this comment.
Looks good, with follow-ups.
Own change. 44d1d7e on 3f6a4d4. It merges cleanly on main (b591947). It's the base of #1688 → #1689.
Checked
- Counts.
signalOutcomereads the action's signals throughaction_signalsonce, when the action is measured.resolvedwithsupersededBycounts as replaced, plainresolvedas ended,dismissedas dismissed, andnew/acknowledgedas open. Those are the four statusessignalsallows, and only the detector setsresolved(record.js), so completing an action doesn't end its own signals and inflate "ended". - Writes. Every path keeps the counts beside what it wrote before. The no-metric path now writes
{ measuredAt, signals }instead ofnull, withnot_measurableunchanged. The other readers ofvalidation(resultsFrom,content.ts, the MCP export,opportunity-reopen.js) all readmetricsoptionally or filter onscope.kind, so the snapshot without windows or metrics doesn't break any of them. - Web.
signalsFromaccepts only non-negative numbers and hides the line whentotalis 0. The sentence reads correctly for one signal ("Of the signal that raised it…") and leaves out zero clauses. - Tests. On this PR's tree,
validate.test.jspasses (23), and so doeshistory-drawer.test.tsx(5). They also pass with the whole stack (#1687–#1689) and #1693/#1698 squashed onto main, together with the rest ofsrc/components/action-centerandsrc/lib/action-centeron the web (25 files) and the web typecheck for these files.
Follow-ups
- Read only what the count needs.
select('signals(status, payload)')(server/src/lib/action-center/validate.js:231) pulls every signal's whole payload, and a group signal carries up to 1,000targetIdsplus each page's issues and evidence. Selectingsignals(status, supersededBy:payload->supersededBy)gives the same counts for a fraction of the transfer, and the nightly sweep does this for up to 500 actions.
Before the API deploy. Nothing shows. The drawer's line appears only once the deployed sweep has written validation.signals; actions already measured keep their result.
This was referenced Oct 28, 2026
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
Learning phase A, A3: an action's measured result keeps what became of the signals that raised it.
An action's result compared its metrics before and after, but never asked the question closest to its own aim: did the signals that raised it end?
signalOutcome(validate.js) reads its signals throughaction_signalsand keeps the counts invalidation.signals:{ total, ended, replaced, dismissed, open }.supersededBy: the condition is still there, but as another kind.The outcome itself is unchanged here; A4 (#1690) decides what counts as improved.
Stack: first of six. Next: #1688 (A1) → #1689 (A2) → #1690 (A4, 00365) → #1691 (A6) → #1692 (A5, 00366). Merge them in order.
Where people see it: Action Center › History › an action › Result.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
cd server && npx vitest run src/lib/action-center/validate.test.jscd web && npx vitest run src/components/action-center/history-drawer.test.tsxRelated issue
Agentic learning report (artifact; draft in the maintainers' notes), phase A: "measure correctly". No GitHub issue. Learning stays within one brand (product decision).
Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)Full checks at the top of the phase A stack (A5, 596dba6):
npm test(noSUPABASE_*env, as in CI): 3,359 tests passed.content-people.test.jstimed out under load and passed alone (32/32).vitest(444 files, 4,348 tests) and build: all pass.A pre-push review of the six branches was run, and its before-merge findings are fixed in the stack (A4: 18e00bc, 5500708, c427343, cc1f9c8; A6: 381f5c6, 52a34fb; A5: 639c3a17). Only new measurements change. Actions already measured keep their result; there's no backfill.
🤖 Generated with Claude Code