@davoodmehraban89 / Aram-2 Mirror · read-only / commits / 07e879b
Fork 0

Mirrored from https://github.com/davoodmehraban89/Aram.git

Synced Dec 4, 15:30 UTC

Governance: sync orchestration snapshots post-#99/#114 merges; lift serialization (#115)

* Tooling: pre-commit guards, detect-secrets baseline gate, Dependabot, Repo Hygiene workflow - .pre-commit-config.yaml: pre-commit-hooks v6.0.0 + ruff-pre-commit v0.17.6 (revs verified via GitHub API); ruff scopes mirror Backend CI exactly. end-of-file-fixer deliberately omitted (14 pre-existing EOF violations incl. governance-frozen files = unrelated churn); trailing-whitespace kept (zero pre-existing violations). - .secrets.baseline: 9 files / 18 reviewed false-positive findings. - scripts/check_secrets_baseline.py: churn-free CI gate — fails only on new (file, type, line-hash) triples; pragma allowlist escape hatch; negative- tested with a staged fake secret (exit 1) and pragma variant (exit 0). - .github/workflows/repo-hygiene.yml: pre-commit --all-files + secret gate on every PR and accepted-branch push. - .github/dependabot.yml: weekly github-actions/npm/pip updates (npm minors grouped; majors stay individual). Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> * CI: frontend prod-dependency npm audit gate + vitest coverage thresholds - frontend-ci quality job: npm audit --omit=dev --audit-level=moderate (prod deps must be moderate-clean; currently 0 vulnerabilities) and npm test -> npm run test:coverage. Dev-only advisories in the vitest/vite chain are recorded in PROJECT_LOG for a dedicated major-upgrade task (not shipped). - vite.config.ts: v8 coverage scoped to src/** (tests/main.tsx/d.ts excluded), thresholds lines/statements 30, branches 70, functions 40 vs measured baseline 33.97/72.97/42.85/33.97 (15 tests); autoUpdate off. - package.json/lock: @vitest/coverage-v8 ^2.1.9 devDependency (+ test:coverage script); lockfile +591 generated lines for its dependency tree. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> * Docs: PROJECT_LOG entry + PROJECT_STATUS CI-gap update for the tooling PR Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> * Fix: exclude .secrets.baseline from its own secret scan The baseline stores hashed_secret values and "hashed_secret" keys, which are secret-shaped by construction: the moment the file became tracked, every scan reported 22 self-referential findings (caught by the first CI run of PR #99; the pre-commit step of the same run passed). The gate now scans with --exclude-files '^\.secrets\.baseline$'; the documented regeneration command carries the same exclusion. PROJECT_LOG entry updated (same-PR doc). Verified: gate 0 new (18 baselined) on the tracked-baseline tree; negative test (staged fake secret) still exits 1 with file:line; pre-commit --all-files all hooks pass with zero modifications; git diff --check clean. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> * Docs(ADR-031): five-role agent orchestration — master prompt + per-role prompts - docs/agent-orchestration/MASTER_ORCHESTRATION_PROMPT.md: the consolidated single-agent prompt (M0 role, loop, invariants, verify-live snapshot, first actions) — owner directive, Arena chat 2026-12-04. - docs/agent-orchestration/AGENT_PROMPTS.md: the five per-role prompts (A1 Analyst / B1 Backend / F1 Frontend / D1 DevOps / T1 Independent Tester) for separate sessions. - docs/adr/ADR-031-agent-orchestration.md: decision record incl. the Arena single-branch constraint, the الف‌5 co-landing disclosure + split recipe, and the merge-activation semantics. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> * Governance: AGENTS.md orchestration pointer + STATUS/LOG/HANDOFF records (ADR-031) - AGENTS.md: compact 'Agent orchestration (five-role model — ADR-031)' section — the ecosystem's auto-read agent entry point now directs every future session to the master prompt before starting or resuming work; precedence clause (never overrides AGENTS.md / ACCEPTANCE_POLICY / booklets) included. - PROJECT_STATUS.md: Agent-operations bullet in the repository baseline. - docs/PROJECT_LOG.md: append-only entry (mechanism, الف‌5 disclosure, secret-gate re-verification, protected-data confirmation). - docs/handoff/LATEST_HANDOFF.md: governance-change refresh per ADR-026 — role-model entry, superseded-head note, current single-next-action. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> * Governance: renumber orchestration ADR 031->032; make orchestration docs R2-aware The parallel session's R2 PR (#100, merged as a8ba20c) landed docs/adr/ADR-031-r2-full-control-set.md, colliding with this branch's ADR-031-agent-orchestration.md. Per the add-new-ADR discipline (never rewrite an accepted ADR), the orchestration ADR becomes ADR-032 with a renumbering note; all refs updated (AGENTS.md, PROJECT_STATUS.md bullet, PROJECT_LOG entry, LATEST_HANDOFF, both orchestration docs). Also refresh stale queue/snapshot claims now that R2 is merged: - B1 queue: R2 marked done/do-not-reimplement; R3-fixes next - MASTER snapshot: live head advanced to a8ba20c; R2 MERGED bullet; first actions reordered (A1 verifies R2, then authors R3 package) - AGENT_PROMPTS: A1 first task, B1 scope/ready text, T1 retroactive verification pass on PR #100, F1 coverage note - LATEST_HANDOFF: next action = R3 after #99 acceptance, with parallel-session coordination warning Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> * Governance: renumber orchestration ADR 032->033 (R3 holds ADR-032-r3); refresh snapshots for R3 (PR #101 merged) R3 (built-vs-official comparison, BS 16/16 MET, IS 6/6 source-data-blocked) merged as PR #101 @ 0578ea5 while this PR was open, taking ADR-032. Per the add-new-ADR discipline the orchestration ADR becomes ADR-033; all refs updated. Orchestration snapshots/queues refreshed: R2+R3 marked merged (retroactive T1 passes queued), B1 queue now R4 -> C1/C3, IS residue flagged as owner/data escalation (never agent-side tolerance). Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> * Governance: record owner-delegated acceptance of PR #99 (PASS, combined); reviewed secret-baseline update for R3 integrity hashes Owner directive (this Arena chat, 2026-12-04): «خودت اینکاری که از من خواستی رو انجام بده» — the pending owner step (independent review + combined-vs-split decision for PR #99) is delegated to the author session; the independence waiver is recorded in PROJECT_LOG per the PR #100/#101 self-merge precedent. Verdict: PASS; decision: combined acceptance (option a); mechanics: squash merge, no tag. Also: reviewed baseline update (.secrets.baseline 18->19) for the two high-entropy false positives R3 introduced in docs/discrepancies.json (SHA-256 integrity digests; JSON cannot host pragma comments) so the gate is green on the merged tree; HANDOFF superseded-note + single-next- action refreshed (mechanism goes live for new sessions after this merge; next: R4 via the orchestration loop; IS residue = owner escalation). Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> * Docs(README): create root README with the AGENTS.md agent entry point Owner-approved follow-up to PR #99 (Arena chat, 2026-12-04): the repo had no root README, so agents (and humans) starting from the repository root had no orientation. Minimal, facts-only README: agent entry pointer (AGENTS.md -> ADR-033 orchestration master/per-role prompts) first, then a verified orientation table, quickstart commands taken from the CI workflows, and the governance quick notes. Every referenced path exists at head 70a0110 (checked individually). Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> * Governance: sync orchestration snapshots post-#99/#114 merges; lift serialization PR #99 (tooling + ADR-033 governance) merged as 70a0110 and PR #114 (root README, second agent entry) as 3c7638d, but the orchestration docs still described #99 as OPEN. Updated: MASTER §8 (head bullet, #99 MERGED bullet with owner-delegation record pointer, serialization lifted) and §9 (T1 pilot -> R2/R3 retroactive passes; F1/D1 unblocked + Dependabot triage pointer), AGENT_PROMPTS (snapshot, serialization, F1 x2, D1, T1 x2), HANDOFF superseded note, PROJECT_LOG entry. Dependabot is live: update PRs #107-#113 (incl. vitest@5.1.2/vite@8.4.0 majors) -> D1 triage queue; owner decides adoption. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com> --------- Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>

davoodmehraban89 committed Dec 4, 2026 at 17:54 UTC 07e879ba1946e22c85560c8b886ba7b3ef26cde1
4 files changed +21 -12
docs/PROJECT_LOG.md
+9
@@ -488,3 +488,12 @@ Each new entry must record: UTC timestamp, actor, task/phase, base branch and SH
488 - Secret-gate event (found during pre-merge re-verification on the synced tree): the merged R3 tree carries 2 detect-secrets findings at `docs/discrepancies.json:7,9` — the `source_sha256`/`official_sha256` integrity digests (high-entropy hex; **reviewed false positives**: recomputable from data files already committed to the repo; JSON cannot carry inline pragma comments). R3 merged before the gate existed on the canonical branch (the gate is part of this PR). Resolution: reviewed baseline update via the documented command (`detect-secrets scan --exclude-files '^\.secrets\.baseline$'`) → **19 findings, gate green on the merged tree**; the baseline was not regenerated to silence unreviewed content. Future note: regenerating `discrepancies.json` against new file hashes will require the same reviewed baseline update.
489 - Post-sync re-verification (docs-only delta since the `047119f` evidence above): pre-commit 8/8 hooks passed; secret gate green (above); `git diff --check` clean; protected trees unchanged (`data` `2ef8a512…`, `samples` `00aba54b…`). Backend is untouched by this PR's delta — the R3 backend state is CI-verified at `0578ea5` (PR #101: lint/types/coverage pass; migration round-trips pass on sqlite and postgresql), so no local re-run was needed; frontend gates run in CI on the final head.
490 - Effect: with this merge, the five-role orchestration mechanism (`AGENTS.md` pointer → `docs/agent-orchestration/MASTER_ORCHESTRATION_PROMPT.md`) **goes live for all new Arena sessions**. Next work per the refreshed snapshots: R4 via the orchestration loop; R3's IS residue (notes 6/7/8/9/20-3) is source-data-blocked → Davood escalation (protected data / accounting ambiguity), not agent code work.
491 +
492 +### 2026-12-04T14:23:44Z — PR #114 merged (root README agent entry); orchestration snapshots synced post-merge
493 +
494 +- Actor: Arena agent (M0). Trigger: owner directive in the author's Arena chat (2026-12-04): «…مرج کن یا به عبارت دیگر اگر کاری نیاز هست یا مانده تمامش کن کامل انجام بده» — merge the pending README PR and finish everything outstanding.
495 +- **PR #114 MERGED** (squash `3c7638d5f9786bc288d19aa29b3293dd21074984`, 2026-12-04T14:23:03Z): root `README.md` (+57 lines) — second agent entry (README → `AGENTS.md` → master prompt) plus facts-only orientation. Verified post-merge: `tree(3c7638d) == tree(f86ab57)` (faithful squash); protected trees unchanged (`data` `2ef8a512…`, `samples` `00aba54b…`); Repo Hygiene CI green pre-merge.
496 +- Snapshot sync (this commit): the orchestration docs still described PR #99 as OPEN after its merge — updated MASTER §8 (head bullet now lists `70a0110`/#99 and `3c7638d`/#114; the #99 bullet becomes MERGED with the owner-delegation record pointer; serialization block lifted) and §9 (T1 pilot replaced by the R2/R3 retroactive passes; F1/D1 unblocked), AGENT_PROMPTS (snapshot line, serialization, F1×2, D1, T1×2), and the HANDOFF superseded note.
497 +- Serialization lifted: F1 coverage-raise and D1 vitest/vite upgrade may start (one active PR per file-area). Dependabot is live on the canonical branch: update PRs #107–#113 opened 2026-12-04 (incl. vitest@5.1.2, vite@8.4.0, eslint-plugin-react-hooks@7.1.1, pytest-cov, setuptools) — D1 triage queue; owner decides adoption.
498 +- First T1 assignment after this sync: retroactive verification of R2 (#100) and R3 (#101) as the protocol pilot (verdicts to the owner).
499 +- Acceptance of this sync PR: owner's blanket «تمامش کن» instruction covers it; merged after CI green, disclosed in the PR body. No tag.
docs/agent-orchestration/AGENT_PROMPTS.md
+7 -7
@@ -4,7 +4,7 @@
4
5 > **وضعیت:** کامیت‌شده طبق **ADR-033** (2026-12-04، دستور owner در چت Arena). این فایل پرامپت‌های **تکی و کامل** پنج نقش برای اجرا در sessionهای جداگانه است؛ نسخهٔ یکپارچهٔ تک‌ایجنتی در `MASTER_ORCHESTRATION_PROMPT.md` است و `AGENTS.md` هر دو را به‌طور خودکار معرفی می‌کند.
6 >
7 -> **Snapshot at design time:** base = `07a8ae0e621e706e4ce1583a611699bc2bc6d38d` (`origin/source-data-cleanup`) · R1 accepted (PR #98 merged) · PR #99 (dev tooling) OPEN, head `73889c7f8329c788b12ffc8481796cf3782a156a` · R2–R6 NOT_STARTED · Dependabot: 15 alerts on default branch.
7 +> **Snapshot (synced 2026-12-04 post-#114):** base ≥ `3c7638d` (`origin/source-data-cleanup`) · R1 accepted (PR #98) · **R2 merged (PR #100 → `a8ba20c`)** · **R3 merged, PARTIAL (PR #101 → `0578ea5`; BS 16/16 MET, IS 6/6 source-data-blocked → owner escalation)** · **PR #99 merged (→ `70a0110`; tooling + ADR-033 governance; acceptance owner-delegated, recorded in PROJECT_LOG)** · **PR #114 merged (→ `3c7638d`; root README, second agent entry)** · R4–R6 NOT_STARTED · Dependabot live on the canonical branch: update PRs #107–#113 opened 2026-12-04 (incl. vitest@5.1.2 / vite@8.4.0 majors) — D1 triage queue.
8
9 ---
10
@@ -27,7 +27,7 @@
27 4. **M0 reviews** verdict + complete diff + governance compliance. `CHANGES-REQUESTED` → specific findings go back to the worker; iterate.
28 5. **M0 integrates**: status/log coherence, then presents the package to the owner / independent reviewer. **Merge & tag = owner/reviewer only (§19).** A T1 verdict is verification evidence, *not* acceptance.
29
30 -**Serialization:** one active PR per file-area at a time. Workers must check open PRs touching their target files before starting (e.g., D1's vitest upgrade and F1's coverage raise both wait for PR #99 to merge — they touch `package.json`, `vite.config.ts`, `frontend-ci.yml`).
30 +**Serialization:** one active PR per file-area at a time. Workers must check open PRs touching their target files before starting. The former #99 block is **lifted** (PR #99 merged → `70a0110`): D1's vitest upgrade and F1's coverage raise (`package.json`, `vite.config.ts`, `frontend-ci.yml`) may now start — still one at a time in that file-area.
31
32 **Stop conditions (all agents):** base SHA mismatch · protected-data change would be required · tests cannot run · auth blocks publication · evidence unobtainable → **stop and report, do not improvise.**
33
@@ -141,7 +141,7 @@ You are Agent **F1 «Frontend Engineer»** on Aram (repository `davoodmehraban89
141
142 - Bootstrap: read `AGENTS.md`, `PROJECT_STATUS.md`, `docs/ACCEPTANCE_POLICY.md`, `PROJECT_LOG.md` tail; `git fetch origin`; verify the work order's base branch + full SHA; **stop and report on mismatch**.
143 - One focused PR, ≤ ~1,500 changed lines excluding tests/generated data (الف‌۵ — note: test files are excluded from the cap, so a test-growing PR may exceed it only with M0's explicit note in the PR body); PR template; `PROJECT_LOG.md` append; `PROJECT_STATUS.md` update when state changes.
144 -- **Before starting:** check open PRs touching your target files. **Open PR #99 touches `package.json`, `vite.config.ts`, `frontend-ci.yml` — your coverage-raise task starts only after M0 confirms #99 merged (or M0 re-orders).**
144 +- **Before starting:** check open PRs touching your target files. **PR #99 (which touched `package.json`, `vite.config.ts`, `frontend-ci.yml`) is merged → `70a0110`; your coverage-raise task may start on M0's work order — coordinate with D1's vitest/vite upgrade (same files: one active PR per area; Dependabot PRs #109–#112 already propose the vitest@5/vite@8 majors).**
145 - Verify: exact test commands, `git diff --check`, protected-data tree hashes before/after.
146 - Push your dedicated branch; open the PR into the approved base. **Never merge, never tag.**
147 - Final report in the AGENTS.md format ending with: `Ready for independent GitHub review; not merged.` Then hand to T1 via M0.
@@ -152,7 +152,7 @@ Modifying `data/`/`samples/`/canonical data · secrets in chat or repo · invent
152
153 ## First assignment
154
155 -Until M0 confirms PR #99 merged: audit the six low-coverage components and deliver a **test plan** to M0 (no code). After confirmation: execute queue item 1.
155 +PR #99 is merged (`70a0110`) — nothing blocks the plan-first step: audit the six low-coverage components, deliver the **test plan** to M0, then execute queue item 1 on M0's go.
156
157 ---
158
@@ -172,7 +172,7 @@ You are Agent **D1 «DevOps / Release & Security Engineer»** on Aram (repositor
172
173 ## Current queue (one PR each unless M0 redirects)
174
175 -1. **Dev-dependency major upgrade:** clear the six dev-only advisories recorded in the `PROJECT_LOG.md` entry of 2026-12-04 (vitest 2.x chain: tinypool ×2 critical, @vitest/mocker + vite-node moderate; vite high ≤6.4.3; esbuild moderate, dev-server only). `npm audit fix --force` proposes vitest@5 (breaking) — plan it as one standalone focused PR: full frontend suite green, coverage re-measured and thresholds consciously re-based (document the new measurements in the PR body), prod-audit gate still 0. **Blocked until PR #99 merges** (same files) — verify before starting.
175 +1. **Dev-dependency major upgrade:** clear the six dev-only advisories recorded in the `PROJECT_LOG.md` entry of 2026-12-04 (vitest 2.x chain: tinypool ×2 critical, @vitest/mocker + vite-node moderate; vite high ≤6.4.3; esbuild moderate, dev-server only). `npm audit fix --force` proposes vitest@5 (breaking) — plan it as one standalone focused PR: full frontend suite green, coverage re-measured and thresholds consciously re-based (document the new measurements in the PR body), prod-audit gate still 0. **Unblocked** — PR #99 merged (`70a0110`); Dependabot has already opened vitest@5.1.2 (#109/#112) and vite@8.4.0 (#110) update PRs — triage/adopt those instead of duplicating; keep one active PR per file-area with F1's coverage-raise.
176 2. **R6 release-checklist package** (documentation PR; no tagging).
177 3. C9 prep per future work orders.
178
@@ -188,7 +188,7 @@ You are Agent **D1 «DevOps / Release & Security Engineer»** on Aram (repositor
188
189 - Bootstrap: read `AGENTS.md`, `PROJECT_STATUS.md`, `docs/ACCEPTANCE_POLICY.md`, `PROJECT_LOG.md` tail; `git fetch origin`; verify the work order's base branch + full SHA; **stop and report on mismatch**.
190 - One focused PR ≤ ~1,500 changed lines excluding tests/generated data (الف‌۵); PR template; `PROJECT_LOG.md` append; `PROJECT_STATUS.md` update when state changes; new ADR for decisions.
191 -- **Before starting:** check open PRs touching your target files (see the PR #99 note above).
191 +- **Before starting:** check open PRs touching your target files (see the D1 note above — the #99 block is lifted; Dependabot update PRs #107–#113 are open on the canonical branch).
192 - Verify: exact commands from the work order, `git diff --check`, protected-data tree hashes before/after, CI green on the real head SHA.
193 - Push your dedicated branch; open the PR into the approved base. **Never merge, never tag.**
194 - Final report in the AGENTS.md format ending with: `Ready for independent GitHub review; not merged.` Then hand to T1 via M0.
@@ -244,7 +244,7 @@ Risks for the reviewer: ...
244
245 ## First assignment (available now)
246
247 -Independently verify **open PR #99** (dev tooling; head `73889c7f8329c788b12ffc8481796cf3782a156a`, base `07a8ae0e621e706e4ce1583a611699bc2bc6d38d`) as the pilot run of this protocol, and deliver the verdict to M0. Thereafter: continuous gate on every worker PR, in queue order. Second in queue: retroactive verification of **R2 / PR #100** (`a8ba20c`) and **R3 / PR #101** (`0578ea5`) — both merged under the owner's directive before this model was adopted; an independent T1 pass now strengthens the evidence chain (backend suite incl. `test_controls_r2.py` + `test_statement_compare_r3.py`, fail-closed approval behavior, BS 16/16 reproduction, coverage floors).
247 +Retroactive verification of **R2 / PR #100** (`a8ba20c`) and **R3 / PR #101** (`0578ea5`) as the pilot run of this protocol — both merged under the owner's directive before this model was adopted, and #99's acceptance was owner-delegated to the author session (self-review, waiver recorded in `docs/PROJECT_LOG.md`), so an independent T1 pass is what strengthens the evidence chain now (backend suite incl. `test_controls_r2.py` + `test_statement_compare_r3.py`, fail-closed approval behavior, BS 16/16 reproduction, coverage floors). Deliver the verdicts to M0. Thereafter: continuous gate on every worker PR, in queue order.
248
249 ---
250
docs/agent-orchestration/MASTER_ORCHESTRATION_PROMPT.md
+4 -4
@@ -105,8 +105,8 @@ Risks for the reviewer: ...
105
106 As of 2026-12-04:
107
108 -- Accepted-branch live head: `07a8ae0e621e706e4ce1583a611699bc2bc6d38d` (R1 real server-side session authentication; PR #98 merged; R1 acceptance MET) — **since advanced: R2 merged as PR #100 → `a8ba20c` (10:40:42Z) and R3 merged as PR #101 → `0578ea5` (11:50:09Z), both owner merges of the parallel session's PRs; verify live.**
109 -- **PR #99 OPEN** — dev tooling (pre-commit guards, detect-secrets baseline gate, Repo Hygiene workflow, Dependabot, frontend prod-audit + coverage gates) **plus the ADR-033 orchestration-governance commits of this very document** — co-landed on one branch under the Arena single-branch constraint (ADR-033, Decision 5). Verify the live head via `gh pr view 99` before acting. **Do not touch colliding files (`frontend/package.json`, `frontend/vite.config.ts`, `.github/workflows/frontend-ci.yml`) until it merges.**
108 +- Accepted-branch live head: `07a8ae0e621e706e4ce1583a611699bc2bc6d38d` (R1 real server-side session authentication; PR #98 merged; R1 acceptance MET) — **since advanced: R2 merged as PR #100 → `a8ba20c` (10:40:42Z), R3 merged as PR #101 → `0578ea5` (11:50:09Z) — both owner merges of the parallel session's PRs — then PR #99 (this document's tooling + governance payload) squash-merged → `70a0110` (14:10:40Z) and PR #114 (root README, second agent entry) squash-merged → `3c7638d` (14:23:03Z), both under owner direction in the author's session; verify live.**
109 +- **PR #99 MERGED** (squash `70a0110`, 2026-12-04T14:10:40Z; owner delegated acceptance to the author session — the self-review waiver and PASS verdict are recorded in `docs/PROJECT_LOG.md`) — dev tooling (pre-commit guards, detect-secrets baseline gate, Repo Hygiene workflow, Dependabot, frontend prod-audit + coverage gates) **plus the ADR-033 orchestration-governance commits of this very document** are now on the canonical branch; **the mechanism is live for new sessions** (entry: `README.md` → `AGENTS.md` → this prompt). **PR #114 MERGED** (squash `3c7638d`, 14:23:03Z) — root `README.md` added as the second agent entry. The serialization block on `frontend/package.json`, `frontend/vite.config.ts`, `.github/workflows/frontend-ci.yml` is **lifted**.
110 - **R2 MERGED** (PR #100 @ `a8ba20c`; a parallel Arena session implemented it, the owner merged under directive; their log: backend **404 tests** incl. `test_controls_r2.py` (48 tests), budget 968/1500, acceptance MET). Controls C-05..C-15 now exist per that PR — **verify live** (`run_controls` wiring, fail-closed «اجرا نشد: دلیل», approval gate, coverage floors) before relying on it; M0 may order a retroactive T1 pass.
111 - **R3 MERGED (PARTIAL)** (PR #101 @ `0578ea5`; parallel session + owner merge; their log: official parsers incl. EQ components×movements matrix (0→24 figures), persisted-`StatementLine` comparison keyed by (statement, note), three engine defects fixed; **BS 16/16 matched on real 1404 data; IS 1/6 exact — notes 6/7/8/9/20-3 blocked by SOURCE DATA** (no tolerance invented; `discrepancies.json` v2, 11 entries; migration `20261204_09` adds `LedgerBalance.source_note`). The IS residue is an owner/data escalation, not code work. **Verify live.** R4–R6 NOT_STARTED.
112 - Recorded debt: six **dev-only** npm advisories (vitest 2.x chain: tinypool ×2 critical, @vitest/mocker + vite-node moderate; vite high ≤6.4.3; esbuild moderate, dev-server) — prod audit clean (0 vulnerabilities); initial frontend coverage gates (30/70/40 vs measured 33.97/72.97/42.85, 15 tests); `src/lib/format.ts` float risk; services-mypy non-strict; GitHub Dependabot reports 15 alerts on the default branch (3 critical / 1 high / 10 moderate / 1 low).
@@ -114,10 +114,10 @@ As of 2026-12-04:
114 ## 9. First actions (in order)
115
116 1. Run the bootstrap (§2); reconcile the snapshot above against the live remote; report any drift to the owner.
117 -2. **T1 pilot:** independently verify open **PR #99** per §6 → deliver the verdict to the owner (this both gates #99 and pilots the protocol).
117 +2. **T1 retroactive passes (pilot):** #99's acceptance was owner-delegated (author self-review, waiver recorded), so pilot the protocol on what is already merged — independently verify **R2 / PR #100** and **R3 / PR #101** per §6 (backend suite incl. `test_controls_r2.py` + `test_statement_compare_r3.py`, fail-closed approval behavior, BS 16/16 reproduction, coverage floors) → deliver the verdicts to the owner.
118 3. **A1:** (a) verify R2/R3 landed (read-only: `run_controls` wiring, fail-closed approval, `official_parse`/`statement_compare`, `discrepancies.json` v2, migration `20261204_09`); (b) author the **R4 work-order package** (remove `create_all` from the production path; backup flow → `alembic upgrade head` → trigger check; exact test commands; PR-size plan under the الف‌۵ cap).
119 4. Issue the R4 work order to **B1** → implement → PR → **T1 gate** → M0 review → owner acceptance.
120 -5. Maintain serialization: **F1**'s coverage-raise and **D1**'s vitest/vite upgrade start only after PR #99 merges (same files); **D1**'s read-only triage report may proceed immediately. **The parallel session that delivered R2/R3 may also queue R4/R5 — coordinate through the owner to avoid duplicate work.**
120 +5. Serialization is **lifted** (PR #99 merged → `70a0110`): **F1**'s coverage-raise and **D1**'s vitest/vite upgrade may now start — still one active PR per file-area; **D1**'s read-only triage report may proceed immediately and should triage the Dependabot update PRs already open on the canonical branch (#107–#113, incl. vitest@5.1.2 / vite@8.4.0 majors) instead of duplicating them. **The parallel session that delivered R2/R3 may also queue R4/R5 — coordinate through the owner to avoid duplicate work.**
121 6. Then **R5** (`docs/c01_exceptions.json` — the six C-01 source rows, unapprovable until resolved; a documentation/data task), **R6** (release checklist; marking is an owner action). Then the C-phases per `PROJECT_STATUS.md`. The R3 IS residue (notes 6/7/8/9/20-3) is source-data-blocked → Davood escalation (protected data / accounting ambiguity), never an agent-side tolerance.
122
123 ## 10. Your reports to the owner
docs/handoff/LATEST_HANDOFF.md
+1 -1
@@ -8,7 +8,7 @@
8
9 - Repository: davoodmehraban89/Aram
10 - Canonical branch: `source-data-cleanup`
11 -- **Live accepted head: `46253c94405abd065dfc5e8cf080b295cb83cde4`** — squash merge of [PR #96](https://github.com/davoodmehraban89/Aram/pull/96) at 2026-12-03T15:22:02Z (owner final acceptance). *(Superseded: the head has since advanced — PR #97 → `f2e6da5`, PR #98/R1 → `07a8ae0`, PR #100/R2 → `a8ba20c`, PR #101/R3 → `0578ea5`, PR #99 (tooling + ADR-033 governance) → squash merge under owner delegation; verify live.)*
11 +- **Live accepted head: `46253c94405abd065dfc5e8cf080b295cb83cde4`** — squash merge of [PR #96](https://github.com/davoodmehraban89/Aram/pull/96) at 2026-12-03T15:22:02Z (owner final acceptance). *(Superseded: the head has since advanced — PR #97 → `f2e6da5`, PR #98/R1 → `07a8ae0`, PR #100/R2 → `a8ba20c`, PR #101/R3 → `0578ea5`, PR #99 (tooling + ADR-033 governance) → `70a0110` and PR #114 (root README agent entry) → `3c7638d`, squash merges under owner delegation; verify live.)*
12 - **Release tag `v1.0.0`** → `46253c94405abd065dfc5e8cf080b295cb83cde4` (owner-authorized, pre-mission). Author does not tag (§19).
13 - Post-merge CI on accepted head: [Backend #47137691800](https://github.com/davoodmehraban89/Aram/actions/runs/47137691800) ✅, [Frontend #47137691857](https://github.com/davoodmehraban89/Aram/actions/runs/47137691857) ✅.
14 - Booklet Phases 0–9 are **VERIFIED_AND_MERGED** at this head (319 backend tests; see `PROJECT_STATUS.md`).