GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — pm-stack: needs-user item contract — whyUser, options, survey, delegation (#1290) by dezren39 · Pull Request #1365 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Oct 27, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Part 1 of the #1290–#1293 needs-user action layer slice (contract → UI → consumer → seam hardening), on top of the triage write path (#1346/#1350).

What lands here

  • TierItem gains the optional design+impl(orchestrator/aggregator): needsDrew item contract - whyDrew class, structured options[], survey questions[], delegation state #1290 extension fields: whyUser (decision | missing-info | approval | access | policy), summary, ifIgnored, options[] (≤6, slug ids, dup ids drop later), questions[] (≤5, mandatory covers, ≥2 options for single/multi), delegation (mode user|first-pass|auto, status, proposal/unable payloads present exactly when their status says so).
  • Per-item sanitization in the live source (src/tier-items.ts): the section gate never learns the fields; malformed extensions drop — delegation as a unit — never the item or the section. An auto delegation on an access/policy item drops at the seam.
  • Fallbacks: whyUser derived (decision kind → decision; question-bearing → missing-info), ifIgnored computed from since, and the delegation default stamped from the standing toggle — Drew's 2026-10-27 decision (ON for decision/missing-info/approval; access/policy never) is the initial preference record; preference actions (set-delegation-default) supersede it; a published delegation always wins; a per-item delegate action overrides the default.
  • Actions store: preference kind, proposal-identity payload fields (proposalRunId/proposalUpdatedAt, impl(aggregator/orchestrator): proposal review state handling - proposal identity, supersede/expiry races, cross-surface counts #1293), multi-choice answers as string arrays, delegate mode drew accepted as legacy alias and normalized to user (role-based naming; no new Drew-named identifiers — legacy needsDrew array name untouched).
  • POST /api/actions boundary checks against the currently published item: option/survey membership, required-question coverage, proposal identity (stale triple → 'superseded/withdrawn'), access/policy auto ban — legible 400s, enforced when the aggregator holds a section.
  • README: the needs-user item contract documented next to the actions store.

Tests: 255 pass (27 new in test/needs-user.test.ts), tsc --noEmit clean, biome 2.3.2 + prettier applied (incl. .md).

Refs #1290 #1293. The /attention UI (#1291) and the orchestration-pass consumer step (#1292) follow in this slice.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Muse Sweep
pm-stack aggregator: needs-user item contract (#1290)
2758419
Per-item extension fields on orchestration tier items — whyUser,
summary, ifIgnored, options[], questions[], delegation — validated
fail-soft in the live source (src/tier-items.ts): the section gate
never learns them, a malformed extension drops (delegation as a
unit), never the item or the section. Fallbacks stamp whyUser,
an ifIgnored line from since, and the standing-toggle delegation
default (Drew's 2026-10-27 decision: auto ON for decision /
missing-info / approval; access/policy never auto; a published
delegation always wins). Role-based naming throughout — no new
Drew-named identifiers; the legacy needsDrew array name stays.

Actions store: preference kind (set-delegation-default), proposal
identity payload fields for approve/reject-proposal (#1293),
multi-choice answers as arrays, delegate mode 'drew' accepted as a
legacy alias and normalized to 'user'. POST /api/actions now checks
triage actions against the currently published item: option/survey
membership, required-question coverage, proposal identity, and the
access/policy auto ban — legible 400s.

Tests: 27 new in test/needs-user.test.ts (sanitizer drops, fallback
defaulting incl. class gate, preference records, gate round-trip,
live-source seam, boundary checks, proposal supersede/expiry,
count-once). 255 pass total; tsc clean; biome 2.3.2 + prettier.
@dezren39
dezren39 requested a review from a team as a code owner October 27, 2026 08:01
@github-actions github-actions Bot assigned dezren39 Oct 27, 2026
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 29 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3bf383cb-c7b1-47d4-8f13-ac889311f747
Commits

Reviewing files that changed from the base of the PR and between 13ee9d6 and 22bb42a.

Files selected for processing: 8
  • pm-stack/aggregator/README.md
  • pm-stack/aggregator/src/actions.ts
  • pm-stack/aggregator/src/model.ts
  • pm-stack/aggregator/src/server.ts
  • pm-stack/aggregator/src/sources/live.ts
  • pm-stack/aggregator/src/tier-items.ts
  • pm-stack/aggregator/test/actions.test.ts
  • pm-stack/aggregator/test/needs-user.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T08:11:20.616580Z 22bb42a New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 27, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2758419d78

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/aggregator/src/tier-items.ts
else if (raw.mode === "first-pass" || raw.mode === "auto") mode = raw.mode;
if (!mode) return undefined;
// Access/policy items never sit in auto, whatever the publisher sent.
if (mode === "auto" && !isAutoEligibleClass(whyUser)) return undefined;

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 27, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Derive the fallback class before rejecting auto delegation

When a publisher supplies a valid auto delegation but omits the optional whyUser, this check drops the entire delegation because the class has not been derived yet. The live source subsequently calls withUserFallbacks, which derives decision or missing-info and replaces the published state with auto/idle. This loses valid working, proposal, or inability state, including its payload and run identity. Derive the effective class before validating auto eligibility so an omitted classification does not erase an otherwise valid published delegation.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/aggregator/src/tier-items.ts
Comment on lines +321 to +323
if ((q.type === "single" || q.type === "yesno") && q.options) {
if (typeof a.value !== "string" || !q.options.some((o) => o.id === a.value))
return `answer for "${q.id}" must be one of its options`;

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 27, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Validate yes/no answers independently of optional options

For live yesno questions, sanitizeQuestions never copies options because it only does so for single and multi. Consequently, the q.options guard always skips validation here: an answer such as value: ["unrelated"] passes both action validation and this boundary check, and counts as satisfying a required yes/no question. Validate the allowed yes/no values and scalar type explicitly instead of relying on options that the sanitizer removes.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/aggregator/src/server.ts
Comment on lines +285 to +290
const problem = checkActionAgainstItem(
parsed.value,
findTierItem(section, parsed.value.objectRef),
Date.now(),
);
if (problem) return json({ error: problem }, 400);

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 27, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Resolve duplicate action tokens before checking current item state

If an option answer or proposal approval is stored successfully but its response is lost, retrying the same clientToken after the consumer removes the item or changes the proposal now returns 400 here. The request never reaches ActionsStore.add, which previously returned the existing action with deduped: true regardless of its current state. This breaks the endpoint's idempotent retry behavior and can report a successfully applied action as failed. Return an existing token's record before performing checks intended for new actions.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pm-stack/aggregator/src/tier-items.ts
Comment on lines +155 to +156
const runId = optionalBounded(raw.runId, 80);
if (runId) d.runId = runId;

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 27, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P2 Badge Require a run identity when accepting a ready proposal

When a publisher omits runId, or supplies one that fails optionalBounded, the sanitizer still preserves a proposal-ready delegation and its proposal. However, proposalIdentity returns null for that item, and neither approval nor rejection can pass checkActionAgainstItem: omitting proposalRunId fails the required-identity check, while supplying any string fails comparison against the missing delegation run ID. Require a valid run ID for proposal-ready states so the published contract does not retain a proposal that the user cannot approve or reject.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Muse Sweep added 2 commits October 27, 2026 08:07
Muse Sweep
Merge remote-tracking branch 'origin/main' into pm/needs-user-actions
aa87018
Muse Sweep
pm-stack aggregator: prettier-format the merged README (treefmt)
22bb42a
Merging current main (Cost Explorer #1364) changed the routes
table geometry; this is the same format-only follow-up as #1350.
@dezren39
dezren39 merged commit 2ff028f into main Oct 27, 2026
4 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the pm/needs-user-actions branch October 27, 2026 08:11
This was referenced Oct 27, 2026
pm-stack: /attention needs-user action UI — options, survey, delegation, proposals (#1291, #1293) #1367
Merged
design+impl(orchestrator/aggregator): needsDrew item contract - whyDrew class, structured options[], survey questions[], delegation state #1290
Closed
impl(aggregator): /attention action UI - standard actions, item-suggested options, inline survey, delegation controls #1291
Closed
impl(aggregator/orchestrator): proposal review state handling - proposal identity, supersede/expiry races, cross-surface counts #1293
Closed
epic(dashboard): PM stack coherence - single-URL, fresh data, triage-able, hierarchical #1184
Open
@dezren39 dezren39 mentioned this pull request Nov 16, 2026
watchdog: reopen issues the bot wrongly closes on merges #10105
Closed
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.