Skip to content

stewards: rename the report actor me to user (BB-97) - #128

Merged
trotterdylan merged 2 commits into
mainfrom
bb/bb-97-rename-steward-report-actor-me-to-user-thr_xmqu79y58r
Oct 28, 2026
Merged

trotterdylan merged 2 commits into
mainfrom
bb/bb-97-rename-steward-report-actor-me-to-user-thr_xmqu79y58r

Conversation

@trotterdylan

@trotterdylan trotterdylan commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Implements BB-97. steward_report's actor value me read as the steward itself, so stewards filed their own next step as me and the row wrongly showed "needs you" (seen on BB-95). The three values now all name a party: user | steward | other. me is still accepted for one release, normalised to user and logged, so a steward whose prompt predates the rename is not wedged.

Merging this rebuilds the bb-server image and stages a restart for every developer's server (at Restart now, or in the 03:00–05:00 ET quiet window). The plugin change only reaches servers through the new image.

Classification

owner-reviewed: it changes the contract of an existing tool argument (steward_report's actor).

What changes

  • store.ts: ACTORS is ["user","steward","other"]; needsUserFor compares "user". A new ACTOR_MIGRATIONS group is appended to MIGRATIONS: it rewrites status.actor from me to user in stored bindings, leaves every other field alone, and is idempotent. It is guarded with json_valid/CASE, so a malformed status is left untouched rather than making the migration throw.
  • server.ts: needsUser compares "user"; the tool schema and description say user. me stays in the input schema only as an alias: the handler normalises it to user and logs one line. The stored value is always user. The description now says outright that user means the server's owner has to act and that the steward's own next step, including re-checking on the next deployment wake, is steward, with the BB-95 case as the example.
  • wake.ts: a standing rule states the same actor meaning (BB-95 example included); the Sentry wake's "report with actor me" is now user.
  • app.tsx: ACTOR_LABEL keys user. skills/stewards/SKILL.md, DESIGN.md and README.md follow.
  • Not changed: the escalation route: "me" and the approval: "me" config value are different fields and keep their names.

Rollback

The previous build parses status with z.enum(["me","steward","other"]) through its json() helper (a safeParse with a null fallback), so a migrated user row reads back as no status there and never throws. Rolling back therefore blanks statuses until each steward's next report; a test pins that the pre-rename schema reads a migrated row as null without throwing.

Testing

  • npm run typecheck in plugins/stewards: pass.
  • npm test in plugins/stewards: pass (745 tests; CI also runs quality_checks (stewards)).
  • New tests: the migration rewrites me → user and is idempotent; steward and other are unchanged; a malformed status does not throw the migration; the pre-rename schema reads a migrated row as null without throwing; actor: "me" is stored as user, needs the user and logs one line; actor: "user" sets needs-you while steward/other do not; the tool's actor description carries the owner/steward wording and the BB-95 example; the board renders the user actor as (you) (app.test.tsx).
  • Not tested: the rendered label in a live browser; the board test pins it from a fixture.

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Independent review running in bb thread @thread:thr_4vexpq9hvz.

— from bb thread thr_xmqu79y58r

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Review round 1 (GLM 5.3, at 01ad067)

Owner review required: yes — it changes the contract of an existing tool argument (steward_report's actor) and rewrites stored status data (a store migration). Who decides: the diff touches plugins/stewards/store.ts and plugins/stewards/server.ts, which the plugin's own decideForPull lists as self-widening paths and returns user before the bigDecisions entry "A store migration" (decide: project, paths bb-plugins/plugins/*/store.ts) can match — so this one is the owner's, not the project steward's (whose spec approval on the ticket is not the PR gate). @trotterdylan, this one needs your approval.

Suggestions

  • PR body, Testing section: "the plugin is not in the CI matrix" is stale — stewards is in the plugins workflow matrix at this head, and both quality_checks (stewards) runs are green. Worth correcting the line so the merge comment does not repeat it.
  • No test renders the user label ("you") in the UI or pins (user) in the CLI/wake status text; both are passthroughs of s.actor / ACTOR_LABEL[user], so the criterion is met mechanically (and the body already discloses the label gap). A one-line actor: "user" fixture in app.test.tsx or sidebar-app.test.tsx would pin it, if BB-98's rebase does not land one first.
  • The input schema still accepts me but the description never names it; the deprecation log line is the only discovery path. Fine if intentional (not teaching the old name) — say so in reply if it is.

Checked

  • Ran myself: npm install, npm run typecheck and npm test in plugins/stewards — typecheck clean, 744/744 tests pass in 21 files. CI also covers it (quality_checks (stewards) pass on both runs), contrary to the body's claim.
  • Verified against ticket:
    • actor: "user" sets needs-you (new sidebar-RPC test), un-hides the thread (waiting-on-others visibility test) and leaves the row unread/ringing (BB-39 test) — met.
    • steward and other behave as before, asserted in the new describe block — met.
    • me accepted, stored as user, exactly one deprecation log line — met (test).
    • Migration: appended at the end of MIGRATIONS (order tests pin the append; no shipped statement index reused), rewrites only status.actor me → user, idempotent, steward/other untouched, malformed status left alone via the json_valid/CASE guard (a NULL or non-object status is also unmatched) — so no stored me survives — met.
    • Rollback: the pre-rename z.enum(["me","steward","other"]) reads a migrated row as null without throwing — met (the test's readAsOldBuild mirrors the real json() helper exactly); the PR body states a rollback blanks statuses until each steward's next report — met.
    • Wording: the actor description says user means the server's owner has to act and that the steward's own next step, including re-checking on the next deployment wake, is steward, with the BB-95 case (a test pins all of it); the wake standing rule and the stewards skill carry the same meaning — met.
    • Escalation route: "me" and the approval: "me" config value untouched (the (open, me) CLI assertion in the choices test still passes) — met.
    • app.tsx limited to the ACTOR_LABEL line, as the BB-98 overlap note requires; source-contract.ts and its copies untouched — met.
  • Migration safety reviewed: append-only (no existing MIGRATIONS entry edited), safe on a live database, json_set writes a JSON string, and readable by the previous build as a null status rather than an error.

— from bb thread thr_4vexpq9hvz

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Round 1 suggestions:

  • PR body, Testing section: fixed — corrected the stale claim to note CI runs quality_checks (stewards), and updated the test count to 745.
  • No test renders the user label: taken — added an app.test.tsx test asserting the board renders Next: … (you) for actor: "user" (5641099).
  • The description never names me: intentional — the alias is kept only so a pre-rename prompt is not wedged, and the description deliberately does not teach the old name; the deprecation log line is the discovery path.

Head is 5641099; the added test is a follow-up the round-1 approval covers, so no new round is needed.

— from bb thread thr_xmqu79y58r

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Review round 2 (GLM 5.3, at 5641099)

Owner review required: yes — unchanged from round 1 (existing tool-argument contract plus a store migration; decideForPull marks the diff self-widening through plugins/stewards/store.ts/server.ts, so it is the owner's). @trotterdylan, this one needs your approval.

Checked

  • Diff 01ad067 → 5641099: exactly the two round-1 suggestions — the PR body's Testing section now says CI runs quality_checks (stewards) with 745 tests, and a new app.test.tsx test pins the board label for a user actor as (you). No runtime code changed, so the round-1 verdict stands on this head.
  • Ran: npx vitest run app.test.tsx in plugins/stewards — 94/94 pass. quality_checks (stewards) was still pending on this head when I checked; the merge gate needs it green.
  • Declined suggestion (naming me in the description) accepted with the author's reason — not teaching the old name; the deprecation log line remains the discovery path.

— from bb thread thr_4vexpq9hvz

@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Approved 5641099 from the Stewards page

@trotterdylan
trotterdylan force-pushed the bb/bb-97-rename-steward-report-actor-me-to-user-thr_xmqu79y58r branch from 5641099 to df735fb Compare October 28, 2026 13:44
@trotterdylan
trotterdylan merged commit 2b667b0 into main Oct 28, 2026
29 of 30 checks passed
@trotterdylan
trotterdylan deleted the bb/bb-97-rename-steward-report-actor-me-to-user-thr_xmqu79y58r branch October 28, 2026 13:55
@trotterdylan

Copy link
Copy Markdown
Collaborator Author

Merged: owner-reviewed, approved by trotterdylan on 5641099 (comment 6470599315, 2026-10-28T13:42:02Z); since then: rebased onto main past BB-99 (#129) and BB-98 (#127) with no conflicts and no change to the diff, typecheck and all 746 stewards tests green, and every check green on df735fb (the hung quality_checks (pr-inbox) push job was re-run to success; pr-inbox is untouched by this PR).

Merging to bb-plugins main moves the pin, rebuilds the bb-server image, and stages a restart for every developer's server: press Restart now under Settings → Plugins → Team setup, or the server restarts in the 03:00–05:00 ET quiet window.

merge commit 2b667b0

— from bb thread thr_imm2a8t3rm

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