Commit graph

515 commits

Author SHA1 Message Date
5442aecb3f docs(14): record user-approved typography exception (D-10) 2026-07-11 13:22:20 -04:00
a71ca10f9b docs(14): UI design contract for /pax8 surface
Pre-populated entirely from existing DESIGN.md tokens plus Phase 14
CONTEXT.md/RESEARCH.md decisions — no new visual language introduced.
Flags the required additive DetailModal.tsx extension for the cost
breakdown drill-down.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHRgZqkzBHBbAbc3KHneuR
2026-07-11 12:30:39 -04:00
cd33955417 docs(phase-14): add validation strategy 2026-07-11 12:19:26 -04:00
64b30a623b docs(14): research phase domain 2026-07-11 12:18:27 -04:00
ccc34110c8 docs(state): record phase 14 context session 2026-07-11 11:55:34 -04:00
4378fa5ebc docs(14): capture phase context 2026-07-11 11:55:17 -04:00
80771a4d2c docs(phase-13): evolve PROJECT.md after phase completion 2026-07-11 11:45:02 -04:00
08ab0f425c docs(phase-13): complete phase execution 2026-07-11 11:44:06 -04:00
c1ed0f9519 test(13): add phase goal verification report — human_needed
4/6 must-haves independently verified against live code and DB state
(scheduled sync fires, full pax8 sequence runs, disable/re-enable
toggle correctly gates the scheduler with DB audit columns populated).
3 items remain pending a human with an authenticated browser session
(admin UI row rendering, manual-route 403/200) — already tracked in
13-HUMAN-UAT.md. No blocking gaps found.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHRgZqkzBHBbAbc3KHneuR
2026-07-11 11:42:44 -04:00
2798798563 docs(13): add code review report
2 critical, 3 warning, 1 info. Critical findings: unguarded POST handler
in /api/pax8/sync (no try/catch around the new integration_settings
query or PAX8 client init), and a missing admin/role permission check
on the same cost-incurring route (any authenticated session can trigger
a sync, unlike the equivalent admin toggle route).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHRgZqkzBHBbAbc3KHneuR
2026-07-11 11:37:47 -04:00
df7322f918 test(13): persist human verification items as UAT
SC#2 (admin UI row) and the manual-route halves of SC#3/SC#4 need a
human with an authenticated browser session — tracked here so they
surface in /gsd:progress and /gsd:audit-uat rather than being silently
dropped when the phase's plan-level tracking shows complete.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHRgZqkzBHBbAbc3KHneuR
2026-07-11 11:06:55 -04:00
50c8d5c64d docs(13-03): record partial live-verification results for Phase 13
Confirms SC#1, and the scheduler halves of SC#3/SC#4 via direct DB/log
access. Also documents the stale-Docker-image root cause found during
testing (image predated all PAX8 code; rebuilt and redeployed) and the
incidental fix needed to unblock the build. SC#2 and the manual-route
halves of SC#3/SC#4 still need a human with an authenticated browser
session — not bypassed via forged auth.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHRgZqkzBHBbAbc3KHneuR
2026-07-11 11:06:31 -04:00
6f59fe07f5 docs(phase-13): update tracking after wave 1 2026-07-11 09:49:45 -04:00
db36c1afe6 chore: merge executor worktree (worktree-agent-a77fd74cb36676519) 2026-07-11 09:48:39 -04:00
dea8df0c53 chore: merge executor worktree (worktree-agent-a0e50d71b0b8ba829) 2026-07-11 09:48:39 -04:00
6490a36894 docs(13-01): record self-check results in summary 2026-07-11 09:48:03 -04:00
73b33f70f5 docs(13-01): add plan summary
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-11 09:47:50 -04:00
d5456bb5c1 docs(13-01): record PAX8 as first DB-toggle-gates-action precedent
Note in Operator config / Integration disable that the pax8 toggle is
the first integration where the DB toggle stops an action (scheduler
skip + 403 on manual sync route) rather than only suppressing
health-check display.
2026-07-11 09:47:17 -04:00
3785559785 docs(13-02): append self-check result to SUMMARY.md 2026-07-11 09:47:13 -04:00
6413f99e78 docs(13-02): complete scheduler & admin toggle admin-surface plan
- Add SUMMARY.md documenting PAX8 integration-health row + 403 disabled-gate
2026-07-11 09:47:00 -04:00
d07c0b7826 feat(13-01): dispatch pax8-daily to fullSync with dual guard
- Extend ScheduleConfig.sync_type union with 'pax8-daily'
- Add dual-guarded branch in executeScheduledSync: skips with a
  distinct log when PAX8 is not configured (isPax8Configured()) or
  when integration_settings.key='pax8' is disabled, otherwise calls
  getPax8SyncService().fullSync('scheduled')
- PAX8-only inline check per D-01 — no shared helper, no changes to
  getDbDisabledKeys()/applyDisableOverlay() or other switch branches
2026-07-11 09:46:48 -04:00
fdc9919381 feat(13-02): gate POST /api/pax8/sync on the disabled toggle
- Return 403 when integration_settings.key='pax8' has disabled=true
- Check runs as the first statement, before isSyncInProgress()
- GET handler unchanged; no new imports (postgresClient already imported)
2026-07-11 09:46:20 -04:00
3c114ae209 feat(13-02): register PAX8 as a toggleable integration-health row
- Add checkConfigOnly('pax8', 'PAX8', 'finance', [PAX8_CLIENT_ID, PAX8_CLIENT_SECRET]) call site
- Flows through existing applyDisableOverlay automatically for /admin/integrations
2026-07-11 09:46:06 -04:00
230296c137 feat(13-01): seed pax8-daily sync schedule via migration 096
- Idempotent INSERT ... WHERE NOT EXISTS seed of the pax8-daily row
  (cron 0 4 * * *, is_enabled false), mirroring migration 089's style
- Covers existing installs since createDefaultSchedules() only seeds
  a virgin sync_schedules table
- Applied to running dev DB and verified idempotent (second run = 0 rows)
2026-07-11 09:46:01 -04:00
b168d44585 feat(appgate): add AppGate SDP integration health check and sync service
Registers AppGate as a checkConfigOnly integration-health row and public
sync route, matching the existing factory + is<Name>Configured() pattern.
Committed now so Phase 13's worktree-isolated executors fork from a HEAD
that includes this integration-health.ts entry, since Plan 13-02 inserts
the PAX8 row immediately after it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LHRgZqkzBHBbAbc3KHneuR
2026-07-11 09:43:48 -04:00
f70a4a36ed docs(13): create phase plan 2026-07-11 09:27:09 -04:00
424c7c85fb docs(13): create phase plan 2026-07-11 09:21:54 -04:00
c4f825bac4 docs(state): record phase 13 context session 2026-07-11 08:20:39 -04:00
e6802d549a docs(13): capture phase context 2026-07-11 08:20:30 -04:00
4b34109a65 docs(milestone-v2.0): add milestone audit report 2026-07-11 07:56:22 -04:00
8ba10d96ef docs(phase-12): audit validation strategy — nyquist compliant, 0 gaps 2026-07-11 07:45:14 -04:00
ff55ff75c2 docs(phase-12): add security threat verification 2026-07-11 07:41:57 -04:00
80897c62df test(12): complete UAT - 7 passed, 0 issues 2026-07-11 07:36:13 -04:00
e92268f38c docs(12): add code review fix report 2026-07-11 07:25:58 -04:00
be6f07b8c9 fix(12): WR-03 follow-up - fix TS type narrowing on token return 2026-07-11 07:24:15 -04:00
1bb2b8b0a2 fix(12): WR-03 validate PAX8 token response shape in Pax8Client.getToken() 2026-07-11 07:22:59 -04:00
76a652ddfd fix(12): WR-02 rotate matchPax8Companies eligibility ordering and raise the limit to prevent starvation 2026-07-11 07:22:25 -04:00
cb8ae85737 fix(12): WR-01 isolate per-row failures in pax8 sync loops so one bad record can't abort the batch 2026-07-11 07:20:54 -04:00
bddf612c7b fix(12): CR-02 stop folding company-match review counts into sync_history.records_deleted 2026-07-11 07:18:27 -04:00
591fc5cf10 fix(12): CR-01 widen partner_cost/partner_cost_total to NUMERIC(14,4) to stop silent precision loss 2026-07-11 07:16:38 -04:00
dbc0d5a703 docs(phase-12): evolve PROJECT.md after phase completion 2026-07-11 07:12:34 -04:00
8a55eb3f2a docs(phase-12): complete phase execution 2026-07-11 07:12:01 -04:00
f9646c6480 docs(12): add code review report 2026-07-11 07:11:50 -04:00
2a4a27f1e0 docs(phase-12): update tracking after wave 4 2026-07-11 07:04:06 -04:00
247d016fcf chore: merge executor worktree (worktree-agent-ab3956ccfacb0f828) 2026-07-11 07:03:50 -04:00
dd01e9a892 docs(12-05): complete plan — live verification approved
Developer reviewed the SC#1-SC#4 verdict block and the auto-match sample
and responded "approved" — all four success criteria pass, auto-matches
are correct, no threshold/mapping changes needed. Marks PAX8-06, PAX8-10,
PAX8-11 complete in REQUIREMENTS.md.
2026-07-11 07:03:24 -04:00
0e8504c1c1 feat(12-05): live PAX8 orders/matching verification script + quantity fix
- scripts/verify-pax8-orders-matching.ts: runs a real Pax8SyncService.fullSync()
  twice, then asserts all four Phase 12 success criteria (order items
  populated with company id + billing period, confident auto-matches exist,
  no-match/ambiguous companies flagged for review, auto-match set stable
  across two syncs). Never logs secrets/tokens.
- migrations/094_pax8_order_items_quantity_numeric.sql (Rule 1 auto-fix):
  pax8_order_items.quantity was INTEGER but real PAX8 usage-based invoice
  items (e.g. Azure per-unit bandwidth overage) report fractional
  quantities, which aborted the entire orders/order_items sync loop on the
  first such row and silently truncated SC#1's item coverage to ~123 rows
  instead of the full ~56k-row history. Widened to NUMERIC(14,4); applied
  directly to the dev DB (existing volume, not a fresh init).
- deferred-items.md: logged pre-existing out-of-scope failures (appgate
  TS2307 type errors, itglue-search.test.ts) confirmed unchanged by this
  plan's files.
2026-07-10 23:10:44 -04:00
f75409448c docs(phase-12): update tracking after wave 3 2026-07-10 22:56:07 -04:00
f8841ebd14 chore: merge executor worktree (worktree-agent-a878e4ba8fa21ac68) 2026-07-10 22:55:49 -04:00
d78aa60a6c docs(12-04): add self-check verification section to SUMMARY
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-10 22:55:33 -04:00