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

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

Synced Dec 4, 13:00 UTC

codex/gate3-signed-year-scope-20261030
add-index-html-10623938925177053894 arena/094f314c-aram arena/2d4eda07-aram chatgpt-phase1b2-autopilot codex/adr-future-connectors-pi-v1 codex/aram-account-note-source-trace-20261031 codex/aram-actions-node24-maintenance-20261031 codex/aram-analyst-review-workbook-20261031 codex/aram-bs-candidate-statement-20261031 codex/aram-cash-flow-direct-candidate-20261031 codex/aram-clean-reference-year-integrity-20261030 codex/aram-cross-statement-controls-20261031 codex/aram-equity-changes-candidate-20261031 codex/aram-five-statement-cli-20261031 codex/aram-five-statement-integration-20261031 codex/aram-five-statement-orchestrator-20261031 codex/aram-gate3-coverage-target-guard-20261030 codex/aram-gate3-hidden-xlsx-guard-20261030 codex/aram-gate3-integration-validation-20261030 codex/aram-gate3-mapping-change-preview-20261030 codex/aram-gate3-stale-note-guard-20261030 codex/aram-income-statement-candidate-20261031 codex/aram-manifest-referential-integrity-20261031 codex/aram-mapping-source-parser-20261101 codex/aram-multidimensional-mapping-20261101 codex/aram-multistatement-mapping-20261031 codex/aram-pipeline-manifest-schema-20261031 codex/aram-readonly-mapping-coverage-20261031 codex/aram-reconciliation-review-gate-20261031 codex/aram-same-flush-fiscal-lock-20261030 codex/aram-synthetic-windows-demo-20261031 codex/aram-trial-balance-diagnostic-20261031 codex/aram-windows-background-detail-search-20261031 codex/aram-windows-detail-review-20261031 codex/aram-windows-five-statement-pilot-20261031 codex/aram-windows-statement-figures-20261031 codex/gate-2a-pilot-workbook codex/gate-2a-pilot-workbook-6864754244772568979 codex/gate3-authenticated-principal-boundary-20261030 codex/gate3-authored-draft-staging-20261030 codex/gate3-carry-forward-preview-20261023 codex/gate3-draft-staging-audit-20261030 codex/gate3-mapping-batch-freshness-20261030 codex/gate3-mapping-batch-review-20261030 codex/gate3-mapping-core codex/gate3-mapping-coverage-20261023 codex/gate3-mapping-excel-20261023 codex/gate3-note-mapping-review-20261023 codex/gate3-signed-year-scope-20261030 codex/gate3-unapproved-proposal-storage-20261030 codex/payvast-mapping-discovery-20261023 codex/phase-2a-backend-foundation codex/phase-2b-post-merge-record codex/phase-2b-source-registration codex/phase-2b-source-registration-12955190277775369594 codex/post-gate2a-control-reconciliation codex/post-pr18-acceptance-record codex/project-control-foundation codex/t1-repo-hygiene-20261023 codex/t2-ci-hardening-20261023 codex/t3-explicit-migrations-20261023 codex/t6a-readonly-diagnostics-20261023 codex/v1-01-safety-gate-hardening codex/v1-year-isolation-followup-20261023 codex/windows-native-pilot-shell-20261030 docs/aram-master-control-plan-20261111 docs/aram-roadmap-dashboard-20261030 docs/financial-statement-reconciliation-1402-1404-20261110 feat/gate3-governed-mapping-20261101 feat/gate3-package9-1-security-20261103 feat/gate3-package9-isolated-20261103 fix/password-unicode-validation-20261111 governance/aram-5-1-3-controls-20261030 governance/role-based-operating-model jules-1168663913887856558-73b8a885 jules-gate-2b-mapping-workflow-foundation-4137724387867065330 phase-1b1-audit-report-7365389436990903239 phase-2a-backend-foundation-10237597358138521261 phase1b2-postmerge-metadata-fix refactor/drg-parent-year-id-15088443704684163304 source-data-cleanup
md 23 lines 3.54 KB
Rendered Raw
1 # Gate 3 signed fiscal-year access — execution plan
2
3 **Candidate [Draft PR #56](https://github.com/davoodmehraban89/Aram/pull/56)**, exact unmerged parent [#55](https://github.com/davoodmehraban89/Aram/pull/55) at `8d82f1e7be9653bac467101234a62029bdfa3178`, original accepted `source-data-cleanup@7dc864fd032f0c4ae4d650d89304a01286a6d914` unchanged. Issue #49.
4
5 1. [x] Checked actual GitHub source and parent Draft status. PR #55 checks signed identity and role, but has no per-company or per-fiscal-year grant. New branch is child of exact parent SHA, without unreviewed merges.
6 2. [x] Added test-first scenarios at `463b340d9bb5a88837439620e8608bcce98e770e`. [RED CI 41110810775](https://github.com/davoodmehraban89/Aram/actions/runs/41110810775): **28 expected failures and 231 passes**, including absent year-access endpoint, malformed signed scopes wrongly accepted and missing authorization module. These are concrete missing-behavior tests.
7 3. [x] Updated `authenticated_identity.py` with strictly validated signed `aram_scopes` and frozen `SignedYearScope`; absent scopes authenticate but cannot authorize a year. New `mapping_year_authorization.py` intersects signed scope/role with current Company/FiscalYear in SQLAlchemy session and Draft-only status; no-autoflush and populate_existing refresh. New read-only `GET /api/v1/auth/year-access/{year_id}` wires verified principal dependency, no finance write action. Initial [CI 41110973867](https://github.com/davoodmehraban89/Aram/actions/runs/41110973867) **2 fails, 257 passes**: tests expected HTTP 403 for structurally mismatched signed role, but correct security semantics are **401 invalid token**, not 403 valid-token-forbidden.
8 4. [x] Corrected 2 test expectations and added direct cross-role access denial test at `59cb141cad81add6523f4fea7a127c8180d080e5`. Note 401 for invalid, role-mismatched signed claims; 403 for a genuine signed role when company/year permission is absent. Re-run exact SHA CI.
9 5. [ ] Run final tests and add focused spec (already created)/plan, append-only logs/handoff; then **CI on exact last documentation SHA**. Check changed-file allowlist, patch sanity, no reviewer count, unchanged accepted branch. Do not claim status from earlier run on later SHA.
10 6. [ ] Independent C1 technical/security, C2 accounting source hierarchy, C3 release/DB-provider review, full upstream acceptance/rebase. No real reviewers have signed; Issue #39 OPEN. IdP and actual grant provisioning, actor persistence, dual control, signed decision audit, CAS apply, Excel importer containment, fiscal data reconciliation and production migration remain Issue #49/#43. No actual enterprise identity provider configured.
11
12 ## Exact changed-file allowlist
13
14 - `backend/src/aram_backend/authenticated_identity.py` (verify optional, signed exact company/year/role grants)
15 - NEW `backend/src/aram_backend/mapping_year_authorization.py` (DB year + company check)
16 - `backend/src/aram_backend/main.py` (read-only scoped API)
17 - `backend/tests/test_authenticated_identity.py` (synthetic signing + SQL negative paths)
18 - New focused spec and plan under `docs/superpowers/`
19 - Append-only `docs/PROJECT_LOG.md`, `docs/handoff/LATEST_HANDOFF.md`
20
21 Do not touch external/accounting data, canonical XLSX/PDF, `data/`, production database, migrations, workflow, dependencies, credentials, releases or accepted branch.
22
23 **Rollback:** close this unmerged Draft; if explicitly accepted in future, independent reviewed revert. A successful read-only year permission preflight is not authenticated reviewer decision, transaction lock, audit signature or financial data permission.