@davoodmehraban89 / Aram-2 Mirror · read-only / commits / 3b16aa1
Fork 0

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

Synced Dec 4, 10:30 UTC

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>

davoodmehraban89 committed Dec 4, 2026 at 09:56 UTC 3b16aa1f80bf30876b32d8f98cb9b3a8370486aa
2 files changed +14 -1
PROJECT_STATUS.md
+1 -1
@@ -117,7 +117,7 @@ Backend **354 passed** (was 319); frontend **15 vitest tests / 5 files**; ruff,
117 - ImportRun/CalculationRun/LineageEdge/Adjustment/UnknownAccountQueue/carried_from_year_id/calculation_run_id refs absent; pilot exception queue not persisted in `domain/` (C1/C4).
118 - `note_engine.acct()` is closing-only; statement_balance-only rows evaluate 0 in notes (C1/C3).
119 - No connector framework / Source Adapter / snapshot reconciliation / packs yet; generality grep test pending (C4/C5/C6).
120 -- CI: `npm ci --no-audit`, coverage gate not 80/90, services mypy non-strict (C9).
120 +- CI: prod-dependency `npm audit --omit=dev --audit-level=moderate` gate + initial frontend coverage gate (thresholds lines/statements 30, branches 70, functions 40 vs measured 33.97/72.97/42.85) + repo-wide pre-commit/secret-gate/Dependabot added by the 2026-12-04 tooling PR (frontend coverage + audit in Frontend CI; `Repo Hygiene` workflow runs pre-commit + detect-secrets baseline gate on every PR). Dev-only advisories in the vitest/vite chain (tinypool ×2 critical, vite high, esbuild/@vitest/mocker/vite-node moderate — none shipped; prod audit clean) await a dedicated vitest+vite major-upgrade task. **The 80/90 frontend coverage target and services-mypy strictness remain open (C9).**
121 - Backup unencrypted; no DPAPI vault / plugin allowlist / SBOM yet (C8/C9).
122 - Browser edition removed (C0); single reference UI = React workbench. Backend `static/pilot` files remain in the tree but are no longer served or mounted (R1); the pilot router keeps the `current_user` dependency and is exercised only by a test-only app.
123 - Windows EXE not built; clean-machine install log + Shadow Run two-company + owner signature pending (C9/C10).
docs/PROJECT_LOG.md
+13
@@ -430,3 +430,16 @@ Each new entry must record: UTC timestamp, actor, task/phase, base branch and SH
430 - Evidence: backend **354 passed** (collect-only 354; was 319), including `tests/test_auth_r1.py` **33** R1 acceptance tests; frontend **15 vitest tests / 5 files**, tsc + eslint clean; `ruff check src tests`, `ruff format --check domain services migrations`, `mypy domain`, `mypy services` clean. Migration 08 verified on a copy of a populated DB: 131,280 ledger rows, 2 users, 28 triggers unchanged; the live preview's legacy `root` logged in and was rehashed 200,000 → 600,000. CI e2e job now starts uvicorn on a throwaway DB with `ARAM_E2E_BACKEND=1` so the real-session e2e actually runs.
431 - Protected data: `data/` tree 2ef8a512523f62f0cf84c5009f141be2f8a9cb5f and `samples/` tree 00aba54b1dc30485ba9b164c8036a7b4bbe9020e unchanged (before = after).
432 - Acceptance: R1 **MET**; author does not merge or tag. Stop after R1 per booklet 2.1 §8. Next: independent GitHub review of the R1 PR; R2 only after acceptance.
433 +
434 +### 2026-12-04T09:56:00Z — Dev tooling: pre-commit guards + secret gate + CI quality gates (owner-requested)
435 +
436 +- Actor: Arena agent (implementation). Trigger: owner asked which tooling would best improve the software and selected the four low-risk items in chat (pre-commit + detect-secrets; prod npm-audit gate; frontend coverage gate; Dependabot). Worked on `arena/2d4eda07-aram` off verified base `07a8ae0e621e706e4ce1583a611699bc2bc6d38d` (= `origin/source-data-cleanup` at fetch time; Arena single-branch session constraint, same as R1).
437 +- `.pre-commit-config.yaml`: pre-commit-hooks v6.0.0 (large-files 1 MB with `data/`+`samples/` excluded, merge-conflict, toml, yaml, detect-private-key, trailing-whitespace) + ruff-pre-commit v0.17.6 (satisfies backend `ruff>=0.8,<1`; revs verified via GitHub API 2026-12-04; hook scopes mirror Backend CI exactly: check on `backend/{src,tests}`, format on domain/services/migrations). `end-of-file-fixer` deliberately NOT enabled: 14 pre-existing files (incl. governance-frozen `docs/handoff/CHATGPT_BOOTSTRAP_PROMPT.txt` and `docs/archive/`) lack the convention; repo-wide normalization is unrelated churn against the focused-diff rule, and the existing `git diff --check` CI steps keep PR diffs clean. `trailing-whitespace` enabled — zero pre-existing violations (verified).
438 +- Secret scanning: `.secrets.baseline` (9 files / 18 findings — reviewed false positives: backend test-fixture passwords, the CI PostgreSQL dummy password, docs SHA-256 hashes) + `scripts/check_secrets_baseline.py`, a churn-free gate failing only on NEW (file, plugin type, line-hash) triples; `# pragma: allowlist secret` is the documented escape hatch. detect-secrets is intentionally NOT a pre-commit hook: its baseline mode rewrites line numbers (exit 3) whenever a baselined file is edited — churn incompatible with الف‌4 diff discipline. Gate negative-tested: staged fake secret → exit 1 with file:line; pragma variant → exit 0; cleanup → exit 0.
439 +- CI: new `Repo Hygiene` workflow (`.github/workflows/repo-hygiene.yml`) — `pre-commit run --all-files` + the secret gate on every PR and accepted-branch push (no path filter). Frontend CI quality job: added `npm audit --omit=dev --audit-level=moderate` (prod deps must be moderate-clean; install keeps `--no-audit` for speed) and replaced bare `npm test` with `npm run test:coverage`.
440 +- Frontend coverage gate (`frontend/vite.config.ts`, `@vitest/coverage-v8` ^2.1.9): scope `src/**` excluding test files/main.tsx/d.ts; thresholds lines/statements 30, branches 70, functions 40 against the measured 2026-12-04 baseline (33.97/72.97/42.85/33.97, 15 tests); `autoUpdate: false`. Raising toward the C9 80/90 target is a separate test-growing task.
441 +- `.github/dependabot.yml`: weekly updates — github-actions (/), npm (frontend, minor+patch grouped, majors individual), pip (backend). Documented limitation: Dependabot does not manage `.pre-commit-config.yaml` revs (bump deliberately via `pre-commit autoupdate`).
442 +- **Dev-dependency debt recorded, NOT fixed here ( الف‌5 — needs a major upgrade, own task):** full `npm audit` reports 6 dev-only advisories — vitest 2.x chain (tinypool ×2 critical, @vitest/mocker + vite-node moderate), vite (high, ≤6.4.3), esbuild (moderate, dev-server only). None ship to users (prod audit: 0 vulnerabilities); `npm audit fix --force` would jump vitest 2→5 (breaking). Owner-scheduled upgrade task.
443 +- Evidence: `pre-commit run --all-files` — all hooks Passed, zero file modifications; secret gate 0 new; frontend eslint + tsc clean; **15 vitest tests pass** under the coverage gate; `npm run build` clean; `npm ci` reproduces the lockfile (+591 lines = generated `@vitest/coverage-v8` dependency tree). Backend code untouched (Backend CI path filter unaffected); no R-task scope touched.
444 +- Protected data: `data/` tree `2ef8a512523f62f0cf84c5009f141be2f8a9cb5f` and `samples/` tree `00aba54b1dc30485ba9b164c8036a7b4bbe9020e` unchanged (before = after).
445 +- Acceptance: IN_PROGRESS; author does not merge or tag. Next: independent review of the tooling PR; the vitest/vite major upgrade and any coverage-threshold raise are follow-up tasks.