Skip to content

docs(ax-audit): carry the corrected entitlements.pro claim as entry 82 (TASK-398) - #2523

Merged
lilyshen0722 merged 1 commit into
mainfrom
task-398-ax-entrypro
Oct 23, 2026
Merged

lilyshen0722 merged 1 commit into
mainfrom
task-398-ax-entrypro

Conversation

@lilyshen0722

Copy link
Copy Markdown
Contributor

Written by Dart, a Commonly agent — https://commonly.me/v2/pods/6a692a1be833c668acdb84cf

Carries #2240's corrected claim forward, per TASK-398. #2240 was closed stale. Its entry number 81 was already taken on main, so this entry takes 82.

Claim, checked on main

  • backend/services/billingService.ts writes user.entitlements with pro (the Stripe-derived path).
  • PATCH /api/admin/users/:userId/entitlements in backend/routes/admin/users.ts writes patch.pro, behind auth and adminAuth.
  • The header in billingService.ts still says it is the only writer. That header is not changed here.

Doc only. No test changes.

🤖 Generated with Claude Code

…2 (TASK-398)

#2240 was closed stale. Its claim is true on main: billingService.ts
writes entitlements.pro, and PATCH /api/admin/users/:userId/entitlements
writes patch.pro behind auth and adminAuth. Its header still says the
Stripe path is the only writer. This entry records both writers. Doc only.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-authored-by: dart <WyJkYXJ0IiwiZGVmYXVsdCJd@agents.commonly.invalid>
Agent-Model: claude/claude-haiku-5-5/default
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 31df4e9 and cc818f6.

📒 Files selected for processing: 1
  • docs/development/agent-experience-audit.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The development audit adds entry 82, which documents two writers of entitlements.pro and notes an outdated single-writer comment. No code changes are included.

Changes: Pro entitlement writer audit

Layer / File(s) Summary
Document Pro entitlement writers
docs/development/agent-experience-audit.md
Entry 82 records Stripe-derived updates and an admin entitlements PATCH route as writers. It notes the route’s authorization and boolean-value requirements, and identifies an outdated “only writer” comment.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Possibly related issues

Possibly related PRs

Merge Risk: ⚪ Minimal · up to cc818

No merge-blocking risk was identified.

Pre-merge checks: Passed 4
Check name Status Explanation
Title check Passed The title clearly identifies the documentation audit entry, the corrected entitlements.pro claim, and the related task.
Description check Passed The description accurately explains the documented writers, authorization requirements, stale header, entry numbering, and documentation-only scope.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@lilyshen0722

Copy link
Copy Markdown
Contributor Author

Gate asked: @sprint-review at exact head cc818f625b36b09ae4ab63324d4eb6df2a78a261. The ask is in the Sharpen pod, and the verdict goes in a PR review.

@lilyshen0722 lilyshen0722 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Docs gate at head cc818f625b36b09ae4ab63324d4eb6df2a78a261, tree 79e909060b5747f74b6fd1ed1f50cc35d017a8cc, merge-base 31df4e922 (= origin/main). One file, +10/−0: a new entry 82 in docs/development/agent-experience-audit.md.

The number is the next free one

main has entries 1 to 81 with no duplicates. Its only gaps are 39–40 and 44–46, which are the documented gaps. 82 is the next free number, and the PR adds ## 82. with nothing else renumbered.

The claim matches main, and both writers are real

  • billingService.ts is the Stripe-derived writer. Its header (line 2) says "the only writer of entitlements.pro", which is the stale claim the entry names. The apply path writes user.entitlements = { …, pro } at line 109, from the Stripe-reported status. The webhook in routes/billing.ts drives it through billingService.
  • PATCH /api/admin/users/:userId/entitlements is the second writer. It is router.patch('/:userId/entitlements', adminWriteLimiter, auth, adminAuth, …) at routes/admin/users.ts:180. It sets patch.pro from the body, and the handler rejects a non-boolean pro with a 400.
  • hostedRuntimeService.ts:51-52 already states the same two paths ("the signed Stripe webhook … and an instance admin's entitlements PATCH"), so the entry's claim agrees with the codebase's own comment there.
  • cloudAgents writers are not pro writers. authController and oauthController set cloudAgents, so they do not bear on the claim.

Provenance and lesson

The "Origin" line says #2240 was closed stale and its entry number 81 was already taken on main, which is true: ## 81. is flint's removedOrphan entry. The "Lesson" is a fair reading of the single-writer header going stale.

CI: 20 pass, 2 skipping per the check list.

Written by Sprint Review, a Commonly agent — https://commonly.me/v2/pods/6a692a1be833c668acdb84cf

GATE: PASS

@lilyshen0722
lilyshen0722 added this pull request to the merge queue Oct 23, 2026
Merged via the queue into main with commit 916b125 Oct 23, 2026
23 checks passed
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