Skip to content

fix: add financial_governance to ComplianceConfig type (unblocks build/release)#83

Merged
shreyas-lyzr merged 1 commit into
mainfrom
fix/financial-governance-type
May 24, 2026
Merged

fix: add financial_governance to ComplianceConfig type (unblocks build/release)#83
shreyas-lyzr merged 1 commit into
mainfrom
fix/financial-governance-type

Conversation

@shreyas-lyzr
Copy link
Copy Markdown
Contributor

Problem

The v0.4.0 release workflow failed at npm run build with:

src/adapters/shared.ts(67,9): error TS2339: Property 'financial_governance' does not exist on type 'ComplianceConfig'.
src/adapters/shared.ts(68,18): error TS2339: ...
src/commands/validate.ts(374,16): error TS2339: ...

PR #79 (financial_governance Phase 1) added the JSON schema + field usage in shared.ts and validate.ts, but never added financial_governance to the ComplianceConfig TypeScript interface in src/utils/loader.ts. main has been failing to compile since that merge.

Fix

Adds the financial_governance shape to ComplianceConfig, matching every field access in the two consumers:

  • enabled?, firewall?
  • spending?max_per_transaction_cents (required number so validate.ts's <= 0 compiles under strict), max_monthly_cents?, currency?, allowed_categories?, blocked_categories?
  • approval?require_above_cents?, timeout_minutes?, auto_deny_on_timeout?

Test plan

  • npm run build compiles (the CI workflow will confirm)
  • Re-run v0.4.0 release after merge → publish succeeds

PR #79 added financial_governance usage in src/adapters/shared.ts and
src/commands/validate.ts and the JSON schema, but never added the field
to the ComplianceConfig TypeScript interface — breaking the build with
TS2339 and blocking the npm release.

Adds the financial_governance shape (enabled, firewall, spending,
approval) matching all field accesses. spending.max_per_transaction_cents
is required (number) so validate.ts's '<= 0' check compiles under strict.
@shreyas-lyzr shreyas-lyzr merged commit 686ddda into main May 24, 2026
3 checks passed
@shreyas-lyzr shreyas-lyzr deleted the fix/financial-governance-type branch May 24, 2026 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant