Skip to content

feat(action-center): keep what became of an action's signals with its measured result (learning A3) - #1687

Merged
gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:feature/outcome-signals-resolved
Oct 28, 2026
Merged

gkhngyk merged 1 commit into
ansvisor:mainfrom
cihan-gyk:feature/outcome-signals-resolved

Conversation

@cihan-gyk

@cihan-gyk cihan-gyk commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

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?

  • When an action is measured, signalOutcome (validate.js) reads its signals through action_signals and keeps the counts in validation.signals: { total, ended, replaced, dismissed, open }.
    • "Replaced" means the signal resolved with supersededBy: the condition is still there, but as another kind.
    • An action with no metric to measure keeps the counts too.
    • An action that no signal raised (sent from Content, Insights…) has none.
  • History's drawer shows 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 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 feature
  • fix — Bug fix
  • chore — Maintenance / dependencies
  • docs — Documentation only
  • refactor — Code change that neither fixes a bug nor adds a feature
  • test — Adding or updating tests

How to test

  1. cd server && npx vitest run src/lib/action-center/validate.test.js
  2. cd web && npx vitest run src/components/action-center/history-drawer.test.tsx

Related 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

  • Branch follows the naming convention (feature/, fix/, chore/, docs/) — see CONTRIBUTING.md
  • Commits follow Conventional Commits
  • yarn lint passes (run from web/)
  • yarn typecheck passes (run from web/)
  • yarn format:check passes (run from web/)
  • Changes are focused — one concern per PR

Full checks at the top of the phase A stack (A5, 596dba6):

  • server format, lint and npm test (no SUPABASE_* env, as in CI): 3,359 tests passed. content-people.test.js timed out under load and passed alone (32/32).
  • web format, lint (0 errors; 7 warnings already on main), typecheck, 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

… 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]>
@mintlify

mintlify Bot commented Oct 28, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 44d1d7e.

Approve preview

@gkhngyk gkhngyk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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. signalOutcome reads the action's signals through action_signals once, when the action is measured. resolved with supersededBy counts as replaced, plain resolved as ended, dismissed as dismissed, and new/acknowledged as open. Those are the four statuses signals allows, and only the detector sets resolved (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 of null, with not_measurable unchanged. The other readers of validation (resultsFrom, content.ts, the MCP export, opportunity-reopen.js) all read metrics optionally or filter on scope.kind, so the snapshot without windows or metrics doesn't break any of them.
  • Web. signalsFrom accepts only non-negative numbers and hides the line when total is 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.js passes (23), and so does history-drawer.test.tsx (5). They also pass with the whole stack (#1687–#1689) and #1693/#1698 squashed onto main, together with the rest of src/components/action-center and src/lib/action-center on the web (25 files) and the web typecheck for these files.

Follow-ups

  1. 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,000 targetIds plus each page's issues and evidence. Selecting signals(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.

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.

2 participants