Skip to content

feat(expense): reimbursable flag, amount-tiered approval, fix rollup docstrings - #40

Merged
xuyushun441-sys merged 1 commit into
mainfrom
optimize/expense
Jun 14, 2026
Merged

xuyushun441-sys merged 1 commit into
mainfrom
optimize/expense

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

Why

  • No way to mark a line non-reimbursable — finance could pay back personal items mixed onto a report (the single most consequential error in reimbursement).
  • The charter advertised "amount-tiered approval" but every report routed to one manager regardless of size.
  • The report/line docstrings claimed a total_amount rollup hook that doesn't exist and would crash the QuickJS sandbox — actively misleading forkers.
  • Two of the most common SMB categories (Mileage, Telecom) were missing.

What changed (within the 3-object cap, no nested-write hooks)

  • expense_line.reimbursable (default true) — flag personal items so the reimbursable total excludes them.
  • Amount-tiered approval: manager → (≥ $1,000) finance-director second sign-off → approved; smaller claims approve on the manager alone. Adds the expense_director role.
  • Categories: Mileage + Telecom/Phone.
  • Docstring honesty: report/line docstrings + total_amount description now say "stored header field, client/seed-maintained" instead of a nonexistent rollup hook.

en + zh-CN updated.

Verification

typecheck + objectstack build + repo format:check clean. Build: 3 Objects / 4 Roles / 4 Flows.

🤖 Generated with Claude Code

…docstrings

- Add `expense_line.reimbursable` (default true) so personal / non-reimbursable
  items can be flagged and excluded from what finance pays back — the single
  most consequential gap in a reimbursement tool.

- Amount-tiered approval (the charter's headline): manager signs off first;
  claims ≥ $1,000 escalate to a new `expense_director` second sign-off before
  final approval; smaller claims approve on the manager alone. Adds the
  `expense_director` role to the hierarchy.

- Add the two most common missing SMB categories — Mileage and Telecom/Phone.

- Honesty fix: the report/line docstrings and `total_amount` description
  claimed a line rollup hook that does not exist and would crash the QuickJS
  sandbox. Reworded to match the charter (stored header field, client/seed
  maintained) so forkers don't build the crashing pattern.

en + zh-CN updated. typecheck + objectstack build + format:check clean
(3 Objects, 4 Roles, 4 Flows).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@xuyushun441-sys
xuyushun441-sys merged commit 0453857 into main Jun 14, 2026
3 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the optimize/expense branch June 14, 2026 23:45
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.

2 participants