Repository navigation
fix(cli,moderation): resolve @handle/username selectors and honor default accounts across inbox, moderation, and compose - #259
Conversation
…ault accounts across inbox, moderation, and compose
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: ready, awaiting a maintainer decision. What this changesThis PR normalizes compose and moderation account selectors, adds inbox account selection, and rejects invalid inbox kinds. Example: Run birdclaw inbox with accounts.default set to @birdclaw_lab.
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⏳ Ready, awaiting maintainer decision This PR provides useful account-selector repairs with no definite introduced bug; owner direction remains necessary for making configured defaults narrow the formerly combined inbox. Priority: P2 Decision needed
Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherCLI commands resolve account selectors before inbox queries, transport identity checks, remote actions, and account-scoped SQLite writes. flowchart TD
A[CLI arguments and config] --> B[Shared account selection]
B --> C[Inbox listing and scoring]
B --> D[Compose and moderation]
D --> E[Transport identity checks]
E --> F[Xurl or Bird actions]
F --> G[SQLite account state]
Technical reviewBest possible solution: Retain the shared selector repairs and obtain the account-selection owner's decision on configured-default inbox scoping. Do we have a high-confidence way to reproduce the issue? Current-main source shows raw account-ID handling at the affected library boundaries and no inbox --account option; supplied base/head CLI traces demonstrate the differences without this review executing target code. Is this the best way to solve the issue? Reusing the existing resolver is the smallest coherent repair, while extending configured-default selection to inbox is a separate owner-controlled behavior choice. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 9895445ba0a2. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (4 earlier review cycles)
Reviewed November 8, 2026, 9:17 PM ET / November 9, 2026, 02:17 UTC (Revision 5). |
…port identity checks
f7f71bb to
0923a80
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Consolidate verified fixes from #257, #258, #259, #260, #261, #262, #263, #264, and #265. Repair account selection, cache restoration, search bounds, input validation, and read-only analysis while preserving existing account and data-safety contracts. Also reject unsafe Git indexes before backup publication and keep recovery snapshots private. Co-authored-by: Bobby Bones <saariuscrypto@gmail.com> Co-authored-by: sm0ky <smokyproductcompany@gmail.com>
|
Thanks for the fixes. I reproduced the reported defects against v0.17.0 and consolidated account selection in Inbox, composition, and moderation into #266, now landed. The overlapping cache ingestion changes from #257 and #261 are included once. The consolidation preserves contributor credit in the changelog and squash commit. Synthetic regressions, independent P0–P2 review, and exact-head CI cover the result; no paid X requests were used. Closing this PR as superseded by the landed consolidation. |
Summary
--account <username>tobirdclaw inbox(src/cli/register-inbox.ts) and passoptions.accountinto bothscoreInbox(--score) andlistInboxItems, honoring the sharedconfigureOperationAccountSelectionexplicit-over-config (accounts.default) rule while preserving an unscoped inbox when neither--accountnoraccounts.defaultis set.inbox --kind(mixed | mentions | dms) withCliInputErrorbefore reading or scoring.@handle, handle,acct_*) viaresolveOperationAccount/findOperationAccountinsrc/lib/query-actions.ts(createPost,createTweetReply,createDmReply),src/lib/blocks.ts, andsrc/lib/moderation-state.ts, verifying transport identity against the resolved account before remote execution or SQLite writes while preservingacct_primarydefaults when unselected.Real Behavior Proof (
dist/cli/birdclaw.js— Basev0.17.0@9895445ba0a24134cc6e07c327502134e18a58eavs Head @0923a80ff6891cfa900973fdb121f59e6f9be9b6)1. Inbox
--accountOption, Configured-Default (config.jsonaccounts.default) Scoping, Account-Scoped Scoring (--score), &--kindValidation (BasevsHead)2. Real Local Moderation Writes (
blocks record&mutes record, No Fake Transport) on Upgradedv0.17.0Archive With Preservedconfig.json({"accounts":{"default":"@birdclaw_lab"}})3. Remote Compose & Moderation Identity Verification via Real
@xdevplatform/xurlv1.3.4Binary (API_BASE_URLLocal HTTP Endpoint)4.
v0.17.0Archive Upgrade &backup export/backup validateCompatibility With Preservedconfig.json{ "accounts": { "default": "@birdclaw_lab" } } { "ok": true, "repoPath": "/private/tmp/bc-export-259", "counts": { "accounts": 2, "tweet_actions": 1, "ai_scores": 1, "collections_bookmarks": 2, "collections_likes": 3, "dm_messages": 8, "dm_conversations": 4, "link_occurrences": 3, "url_expansions": 3, "blocks": 2, "mutes": 2, "profiles": 7, "timeline_edges_home": 5, "timeline_edges_mention": 3, "tweets": 7 }, "backupHash": "79fa95a9910d7e6daee5727997145f4b6a97c61a110b3531f1925f9cde64de6e", "errors": [] }5. Regression Suite Base-Fail (
9895445ba0a2) vs Head-Pass (0923a80ff689) (src/cli/account-scope.test.ts+src/cli.test.ts)9895445ba0a24134cc6e07c327502134e18a58ea):node ./scripts/run-vitest.mjs run src/cli/account-scope.test.tsfails86/87tests (error: unknown option '--account'oninbox,Unknown account: @birdclaw_labonblocks/mutes/compose, and unvalidated--kind bogus).0923a80ff6891cfa900973fdb121f59e6f9be9b6):node ./scripts/run-vitest.mjs run src/cli/account-scope.test.ts src/cli.test.tspasses220/220tests (87/87insrc/cli/account-scope.test.tsand133/133insrc/cli.test.ts).Known gaps
GitHub Actions CI has not run on this head. The workflow is waiting for a maintainer to approve it. The verification above is local: unit tests and the shipped CLI against a local archive, not a live X account.
☁️