GeezerVison is showing github.com — fix(aggregator): verify privileged comment authors (#941) by dezren39 · Pull Request #4832 · developing-today/code
Conversation
dezren39
commented
Nov 3, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
POST /api/comments
resolve operator token from Bitwarden
secret missing -> preserve current writes, mark author unverified
secret unavailable -> fail closed for Drew/Muse
secret configured -> require constant-time Bearer match for Drew/Muse
The dashboard accepts a token without embedding it in server-rendered HTML, stores it only in browser local storage, and can forget it. Stored comments expose authorVerified; the consumption contract rejects treating unverified messages as Drew/Muse instructions and disallows Drew attribution for unverified GitHub posts.
Evidence
bun test test/slice3.test.ts — 36 passed, including legacy rollout, forged-author rejection, and verified-token posting.
git diff --check — clean.
- Full
bun test — 1295 passed; two unrelated failures reproduced on clean main (curation-1497 manifest table and brief-surfaces render argument mismatch).
bun run typecheck remains blocked by pre-existing errors in dns.ts, projects.ts, push.ts, and unrelated tests; no diagnostics referenced changed files.
Merge Danger
Door: two-way.
Blast Radius: medium — only the comment creation path changes. Existing access remains until the operator-token secret is provisioned; once configured, privileged writes require the token.
![Autofix with [code]smith](/api/image?u=https%3A%2F%2Fcamo.githubusercontent.com%2F33b6f70f3541c4e93f4503d29cbfec051fa1b040d8e0ae9313a51c4ece44a627%2F68747470733a2f2f70722d636f6d6d656e74732d6173736574732e626c61636b736d6974682e73682f636f6465736d6974682f6175746f6669782d776974682d636f6465736d6974682d6461726b2d33782e706e67)
Open in [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.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-11-11T15:28:35.153339Z |
425f9a2 |
Manual request |
ℹ️ 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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Nov 3, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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 33 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:
53fa2438-998b-4a48-85d4-60c7924c7eee
Commits
-
Reviewing files that changed from the base of the PR and between 7e40a3a and 425f9a2.
Files selected for processing: 7
-
pm-stack/aggregator/README.md
pm-stack/aggregator/src/comments.ts
pm-stack/aggregator/src/model.ts
pm-stack/aggregator/src/render.ts
pm-stack/aggregator/src/secrets.ts
pm-stack/aggregator/src/server.ts
pm-stack/aggregator/test/slice3.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
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Nov 3, 2026
This was referenced Nov 8, 2026
This was referenced Nov 8, 2026
…ss IPC port
Shepherding #4832 onto current main: the slice3 token test spawns a second server that inherited the parent server freshness IPC port through Bun.env, so it died at boot (Bun.serve port conflict) and the readiness loop timed out — the test could never pass alongside the parent server (or the production aggregator, which holds the default 4871). The child now gets tokenPort + 2000 as its PM_AGG_FRESHNESS_PORT. Test-only change.
|
Shepherd update (lane code-b, task 12314): this PR is rebased onto current main and verified; it now needs a fresh Codex pass on the new head, then merge.
Rebase: 35ce32010f → af926099a5 (single commit) + 425f9a2be9 (test fix below). Conflicts were in comments.ts (kept both main's #950 result-URL guard and this PR's authorizeCommentAuthor) and server.ts. The server route conflict was semantic: main gained #1253 Access-JWT author enforcement (enforceAccessAuthor) after this PR branched. The resolution composes the two gates in sequence — Access-derived authorship first (identity), then this PR's operator-token authorization on the derived author (privilege, fail-closed when the secret is configured) — which is what the code after the conflict already assumed (commentsStore.add(..., { authorVerified: authorization.authorVerified })).
One test-only fix (425f9a2be9): the operator-token API test spawns a second server that inherited the parent server's freshness IPC port through Bun.env, so it died at boot on a port conflict and the readiness loop timed out — the test could never pass next to a parent server (or the production aggregator holding the default 4871). The child now gets its own PM_AGG_FRESHNESS_PORT.
Verification (local, laptop; freshness port overridden because the production aggregator holds 4871):
bun test test/slice3.test.ts: 42 pass / 1 fail — the one failure ("dns page renders…") fails identically on pristine current main (control run: 38 pass / 1 fail, same test), so it is pre-existing and unrelated.
- Adjacent suites (access-identity, api-health-comments, comments-queue-1210, comments-surrogate-7731, slice2): 53/53 pass.
bunx tsc --noEmit: 26 errors, identical count on pristine main, none in this PR's files.
- The acceptance behavior is pinned by the now-passing test "comment API rejects forged Drew and accepts the operator token when configured".
Remaining: Codex review of head 425f9a2be9, then squash-merge and close #941 with the test evidence.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@codex review
Fresh review requested on head 425f9a2be9 (task 12314, lane code-a). The previous Codex round (2026-11-03, old head 35ce32010f) failed on Codex usage limits before producing any findings, so this rebased head — Access-JWT author enforcement (#1253) composed with the operator-token author authorization from this PR — has never had a Codex pass.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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: 425f9a2be9
ℹ️ 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.
Comment on lines
+669
to
+670
|
|
<label>Operator token <span class="muted">(needed for verified Drew/Muse posts after setup; saved only in this browser)</span></label><input type="password" name="operatorToken" autocomplete="off" placeholder="Paste operator token when issued">
|
|
|
<button type="button" data-forget-operator-token>Forget saved token</button>
|
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.
Add token entry to the per-card comment forms
Once the operator secret is configured, Drew cannot submit comments from the attention queue cards in a browser without a saved token: cardCommentHtml() renders a separate .cform without an operatorToken input, while the shared submit handler requires either that input or an existing local-storage value. The token controls added here only appear in commentFormHtml(), not on the attention page. Consequently, the card's “Send comment” action returns 401 with no way to supply the token on that page, including when Access derives the owner identity as Drew. Add token entry to the card forms or provide a shared token-setting control accessible from those pages.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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.
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.
|