Repository navigation
PASAY-BACKEND-FINAL-CLOSEOUT-001: savepoint 事务边界 + Backend Freeze Candidate #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jhackuy
merged 46 commits into
milestone/4-lease-moveout-closure
from
milestone/backend-final-closeout
Aug 26, 2026
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
7f3f1a3
chore(solo-transition): retire /ND and enable TRAE SOLO mode (#35)
jhackuy 00cbcfd
Merge pull request #36 from jhackuy/milestone/1-org-scope-foundation
jhackuy 82af6d3
feat(projection): add reopen_closed_projections reverse-path seam
7f58b2f
feat(expense): close 3 Truth gaps — reverse reopen task / claim fail …
d922810
feat(reports): migrate Deps to Membership role + 6 reports org_id fai…
aeecf7b
feat(operations): Deps -> Membership.role + tasks/quick/copilot full …
ae5ea57
feat(tasks): D2-B legacy write 405 deprecate + read fail-closed scope…
dd92168
test(m003): 9 targeted tests — expense 3 Truth gaps + Reports/Operati…
e41533e
ci(pasay-gate): add M003 tests to backend pytest; timeout 12m->15m
247066a
fix(expense): fail_payment_claim use membership.org_id + explicit ass…
d4440ea
chore(governance): establish single canonical constitution chain for …
39f6333
fix(expense): fully_paid never closes repair — create canonical verif…
ee3067f
fix(ci): pasay-gate AGENTS.md grep updated to Permanent Engineering T…
9469b14
fix(operations): quick views + digest org scope fail-closed via membe…
3680471
test(m003): T3 rewrite — fully_paid schedules followup, does not clos…
e2abc1e
fix(projection): reopen_closed_projections savepoint + dedupe conflic…
349f6ce
fix(m004,closeout): schedule_inspection savepoint inner tx boundary -…
a5cfd6c
test(m004,closeout): savepoint precise anti-tests: concurrent race no…
47e8692
fix(savepoint,closeout,return1): test_14/test_15 deterministic before…
ae1e68d
fix(worker,closeout,return1): explicit 7-key Container envVars + mask…
f3e8938
test(worker,closeout,return1): 14 RETURN-1 CLOSEOUT scenarios (31/31)…
268fb0b
test(closeout,return1,p019): thread-local dep override so /internal/i…
4af3285
test(worker,p019,closeout,return2): 6-key envVars assertions + p019 n…
66afd43
merge: no-ff origin/feature/telegram-ui-v2 into milestone/backend-fin…
180d3f8
merge(no-ff): origin/milestone/3-expense-scope-hardening into milesto…
42b10bd
feat(core): resolve_org_membership supports SystemReader
8b888c6
test: harden 27 files for P2b-3 convergence (r66 961 passed)
02672c3
ci(infra): add 13-gate backend-freeze-gate workflow
97f6e1b
ci(infra): fix backend-freeze-gate DOOR-02 runner missing _fresh script
411abed
ci(infra): fix backend-freeze-gate DOOR-04 container name interpolation
29501b0
fix(auth): fail closed on ambiguous SystemReader organization scope
7f6e795
fix(ci): freeze-gate NUM_TABLES EMPTY_STARTUP DOOR-12 Fail-Closed
1171b7f
fix(auth): fail-closed 4 endpoints + Assignee same-org ACTIVE members…
865ec61
fix(minor): 10 minor lint test docs + regression fixtures
4f478f8
test(org-boundary): 6 cross-org counterexamples + 4 fixture integrity…
97ad3fc
fix(ci): freeze-gate container_name github_expr docker-run diagnostic…
4c59cd4
fix(critical): use OperationalTaskPriority.medium instead of non-exis…
e3d454c
fix(org): fail-closed org scope for copilot/gen/quick/summary/reports…
2ee5669
test(conftest): DB-name fullmatch guard + org fixture idempotent sear…
0b93114
test(truth): Decimal-only monetary fields, tz-aware datetimes, remove…
fd7ed29
test(ret3): add 24 precise regression anti-tests for 28 C/M/m review …
870203b
fix(ci,worker): mask quoted JSON secrets in error logs + CI timeout r…
86491b3
fix(ret3,phase6): 10 second-pass CodeRabbit actionables (4M + 6m) on …
240ed93
fix(ret3,final-fix): CodeRabbit Review 5025626354 (2026-08-26) 16 ac…
5e238eb
ci(pr-ci, pasay-gate): align PASAY_TEST_DB_NAME (pasay_gate_001) wit…
f76d165
fix(ci): use isolated database name in pasay-gate
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,27 +1,59 @@ | ||
| # Pasay SOLO — AI Development Control | ||
| # Pasay — Project Constitution | ||
|
|
||
| TRAE SOLO 是 Pasay 的主工程执行者。本文件是 Pasay 仓库级开发控制入口。 | ||
| TRAE SOLO 是 Pasay 项目的主工程执行者。本文件是 Pasay 仓库唯一的开发控制宪法(Canonical Project Constitution)。 | ||
|
|
||
| ## Canonical Rules Location | ||
| ## 1. SOLO Identity | ||
|
|
||
| - Pasay 项目级工程规则:`project_rules.md` | ||
| - Pasay 项目完整上下文与接手合同:`SOLO_HANDOFF.md` | ||
| - 历史工作流(已退役,仅作记录):`AI_WORKFLOW_RULES.md`(HISTORICAL)、`GITHUB_DEV_WORKFLOW.md` | ||
| TRAE SOLO 是 Pasay 的主工程执行者,负责: | ||
| - 阅读代码、理解架构、制定 Milestone 技术实施计划 | ||
| - 跨合理文件完成完整业务 Milestone(migrations / tests / reasonable refactor / bugfix) | ||
| - 修复普通代码、测试、类型、lint、migration 问题 | ||
| - Git:branch / commit / push / PR | ||
|
|
||
| ## Long-Term Engineering Rules(继续有效) | ||
| SOLO 不是:产品 Owner、部署运维、Code Review 最终决策者。 | ||
|
|
||
| - Git authority and history safety are non-negotiable: no default-branch rewrite, | ||
| no force push, no shared-history rewrite, no overwriting remote-only commits. | ||
| ## 2. Owner-Only Decision Boundary | ||
|
|
||
| 只有 Owner 决定以下事项(SOLO 不自行替代): | ||
|
|
||
| 1. 改变产品方向 / 核心业务模型 | ||
| 2. 重新定义 Owner / Secretary / Tenant 权限边界或角色语义 | ||
| 3. 推翻冻结架构(`ARCHITECTURE_FROZEN=YES`) | ||
| 4. 删除现有已确认业务能力 | ||
| 5. Merge PR、production deploy、Secrets 写入 | ||
| 6. 财务/金额/核心业务规则变更 | ||
|
|
||
| ## 3. Context-Loading Chain(上下文加载顺序) | ||
|
|
||
| SOLO 会话启动时按以下顺序加载上下文(**本文件 = 最高权威,优先级递减**): | ||
|
|
||
| 1. **`AGENTS.md`(本文件)** — 项目宪法:永久真相 + 身份 + 边界 + 加载指针 | ||
| 2. **`.trae/rules/pasay-governance.md`** — alwaysApply 硬安全禁令(Hard Bans ONLY) | ||
| 3. **`project_rules.md`** — 工程执行细节参考(非宪法级,不与上两层冲突时有效) | ||
| 4. **`SOLO_HANDOFF.md`** — 历史接手合同与项目快照(作背景参考,永久真相以本文件为准) | ||
| 5. **`CURRENT_ARCHITECTURE.md`** — 架构冻结记录(`ARCHITECTURE_FROZEN` 条款服从 §2 Owner-Only) | ||
|
|
||
| 旧 `.ai-control/` 目录、`AI_WORKFLOW_RULES.md`、`GITHUB_DEV_WORKFLOW.md` 全部已退役,不影响 SOLO。 | ||
|
|
||
| ## 4. Permanent Business Truths(永久产品真相,不可擅自改写) | ||
|
|
||
| - Operation 是真值(Truth),Task 是投影(Projection)。严禁 Task 状态反向决定业务真值。 | ||
| - Business Truth First: | ||
| - Reminder / Reply / Notification ≠ Completion | ||
| - Task 只是真人动作投影;Operation CLOSED 只有现实问题真正解决才允许 | ||
| - Quote(报价)≠ Expense(支出真实发生) | ||
| - Approval(审批通过)≠ Payment(钱真的付出去) | ||
| - Payment Claim(声称已付)≠ Verified Payment(到账凭证验证) | ||
| - Partial Rent(部分付款)≠ Paid(完全结清) | ||
| - 财务类型:DB `NUMERIC(14,2)`,Python `Decimal`,**禁止 float** | ||
| - 时间类型:DB `timestamptz`,Python `datetime with timezone.utc` | ||
| - 权限边界:Organization / Membership 是业务权限唯一边界(Fail-closed) | ||
| - 架构冻结拓扑:Telegram → Cloudflare Worker → Cloudflare Queue → Cloudflare Container → Neon PostgreSQL 16 | ||
|
|
||
| ## 5. Permanent Engineering Truths(永久工程真相) | ||
|
|
||
| - Git authority and history safety are non-negotiable: no default-branch rewrite, no force push, no shared-history rewrite, no overwriting remote-only commits. | ||
| - Never delete, skip, or xfail real failing tests just to manufacture a PASS. | ||
| - Agent self-report is never enough to claim success; independent GitHub checks, | ||
| reviews, and human acceptance remain authoritative. | ||
| - Final Owner-facing reports default to Chinese unless the task explicitly says | ||
| otherwise. | ||
|
|
||
| ## Hard Bans(永远有效) | ||
|
|
||
| - No force push / force-with-lease | ||
| - No merge PR (TRAE SOLO 不 merge) | ||
| - No production deploy (TRAE SOLO 不负责部署) | ||
| - No secret write or credential commit | ||
| - No weakening confirmed business facts or core product rules | ||
| - Agent self-report is never enough to claim success; independent GitHub checks, reviews, and human acceptance remain authoritative. | ||
| - Final Owner-facing reports default to Chinese unless the task explicitly says otherwise. | ||
| - All delivery goes through PR; never modify authority or base-branch business code directly. |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.