سامانه صدور فاکتور و حسابداری
docs(state): reconcile 2026-10-12 GitHub CI and Supabase evidence without scope expansion
davoodmehraban89 committed
Oct 12, 2026 at 17:59 UTC
a053d2e3627105566c09d82475ff916fcd5e804e
1 file changed
+8
PROJECT_STATE.md
+8
@@ -14,6 +14,14 @@ This is high-assurance accounting/ERP software. Posted financial history, tenant
14
## Current session authority — 2026-10-02
15
The latest user message is the sole source of new instructions. Read AGENTS.md then PROJECT_STATE.md in full; verify live main/head/recent commits/CI and Supabase migrations/RLS before implementation; reconcile discrepancies first. Record each request before implementation and update this file in the same commit as every durable change. Work in verified vertical slices. CI success alone is not completion: real-DOM smoke and accounting-invariant tests must pass; unrun checks are NOT VERIFIED. Every Supabase migration must be archived under supabase/migrations/. Ask the owner before schema/RLS/auth/role changes or destructive data operations; older standing approvals below do not override this requirement. Final reports: Persian, approximately 15 lines maximum, evidence SHAs/run IDs, unverified work and next step. This request authorizes verification and reconciliation; older backlog entries are context, not new implementation instructions.
16
17
+## 2026-10-12 owner live-repository/Supabase operating request — VERIFIED READ-ONLY RECONCILIATION / PHASE 0 OPEN
18
+- **Latest chat instruction (sole new authority):** open `davoodmehraban89/Factor-easy` on `main`; read `AGENTS.md` then all of `PROJECT_STATE.md`; verify head, recent commits, CI, live Supabase migrations and RLS before implementation; correct state discrepancies first, record request before functional changes and maintain same-commit continuity for each durable change; require actual real-DOM and accounting-invariant evidence before any COMPLETED claim; list unexecuted gates as NOT VERIFIED. Every future Supabase migration must be archived under `supabase/migrations/`. **Prior approval does not waive explicit owner confirmation for any schema/RLS/Auth/role or destructive-data change.** No separate product feature was requested in this chat; scope is bounded read-only reconciliation and this documentation-only change.
19
+- **GitHub readback:** authenticated repository metadata confirms default branch `main` (push access), with latest returned commit `cc1c2cfddcff3a1f27302c027b9467fafa8b29f8` (documentation-only `PROJECT_STATE.md` change); preceding runtime merge `a67c07a717bffc2a8ee90c7e3cc9db55c2d05881` (startup optimization), before that `61cbcf3113c598022d6877e447bf8c97b4788a19`. Do not confuse the current documentation HEAD with the previous deployed runtime SHA.
20
+- **Independently fetched previous exact-runtime-SHA GitHub jobs:** Quality run `38230349289` (static job `114748008377`, database jobs `114748008669`, `114748008801`, `114748008884`) all SUCCESS; job log explicitly records **89/89 Chromium Playwright**, Golden sale/receipt/purchase/payment/expense/reversal/trial balance/financial statements, phases 2–6, financial draft/posted safety, and accounting P0 PASS. Security run `38230349290` CodeQL `114748007614` and release safety `114748008097` SUCCESS; dependency review `114748009940` SKIPPED, not passed. Exact-SHA release gate `38230688599` and Pages `38230726054` jobs SUCCESS. **Current documentation-only HEAD `cc1c2cf...` individual Actions/check-run result was not obtainable from the available commit-check endpoint (empty statuses and PR-only run lookup): NOT VERIFIED; earlier a67 runs do not certify cc1.**
21
+- **Independently read live Supabase `hcsixhqbyuhpshfwqpjx`:** `ACTIVE_HEALTHY`, PostgreSQL `17.6.1.166`, **82 recorded migrations**, latest `20261012075507 fix_identity_bootstrap_license_before_membership`; `20261007165208 phone_identity_profile`, `20261011174445 posted_source_idempotency_index`, and Wave 4/4b are present. Live records are not proof of exact SQL text parity with repository migration archives. The historical missing phone-identity archive/PR #58 issue remains unresolved; sampled `supabase/migrations/20261007165208_phone_identity_profile.sql` is 404 on `main`, while current bootstrap correction `supabase/migrations/20261012080000_fix_identity_bootstrap_license_before_membership.sql` exists. **Complete 82-to-repo migration SQL parity: NOT VERIFIED**; do not invent/reapply or replace historical migration SQL.
22
+- **Direct PostgreSQL permission audit, read-only:** **18/18 `public` tables have RLS enabled**. In `private`, **3/10 RLS enabled**, **7/10 disabled**. Despite generic Supabase RLS-warning wording alleging client exposure, actual `has_table_privilege` checks show **zero direct SELECT/INSERT/UPDATE/DELETE grants for both `anon` and `authenticated` on all ten private tables**; anon also lacks private-schema USAGE. Treat seven disabled-RLS tables as a recorded defense-in-depth/security review item **not verified as publicly accessible**, not a reason to enable RLS or modify grants without approval. This does **not** prove every SECURITY DEFINER RPC authorization path safe. Security Advisor: three private RLS-no-policy INFO, 21 authenticated-callable SECURITY DEFINER WARN and one leaked-password-protection-disabled WARN; performance advisor identified two unindexed private scheduler FKs (review only). Public RLS predicate adversarial tests, authenticated production two-user isolation, and end-user browser tests remain NOT VERIFIED.
23
+- **Reconciliation outcome:** updated the dated 2026-10-02 continuity snapshot with verified October 12 evidence while preserving historical entries, and distinguished current doc HEAD from released runtime. **Phase 0 remains OPEN, not owner accepted.** No product feature, finance data, accounts, Auth/RLS/role/schema, Supabase migration or deployment changed in this slice. Documentation branch only, rollback by reverting this entry. **Next safe step:** review/merge this documentation-only PR after exact-PR-head Quality/Security evidence; separately audit PR #58 archive parity read-only and obtain owner-session F0 acceptance evidence without credentials or financial writes.
24
+
25
## Current change ledger
26
| 2026-10-07 | Owner requested accounting/product usability refinement from live screenshots: automatic non-user-entered floating-detail codes, contextual in-product guides (especially accounting/chart/dimensions), remove duplicate product internal tax ID and use product code as internal item ID, strengthen in-control product/person search, introduce hierarchical product group/subgroup coding with deterministic 6-digit product codes, and keep sale/purchase commercial-document workspace layout stable while only semantic fields change. | **IMPLEMENTED / LOCAL VERIFICATION PASSED / CI PENDING** | Baseline main = `7e58c75f7d754f378d94ca3f356c1ae580aa7ee3`. Automatic dimension type/value codes, contextual guides, product-code-as-internal-ID, normalized multi-token search, and additive six-digit product coding implemented. Existing historical codes preserved. Commercial sale/purchase workspaces now share a stable `صدور سند تجاری` header/actions layout; duplicate purchase sidebar injection removed; the public selector is the single document-type selector and the legacy internal invoice-kind control is hidden. Local syntax/static/commerce/UX/accounting phases 2–6/Golden checks passed; protected-branch CI remains pending. |
27