Skip to content

[P3] Multi-RUC profile testing + multi-emisor support #22

@Railly

Description

@Railly

Context

`sunat cpe profile set` supports multiple named profiles (`--name beta`, `--name prod`) but no real exercise of multiple ACTIVE RUCs in the same process. The audit log mixes them via `emisorRuc` in idempotency keys; in theory it works.

Scope

  • E2E test: emit factura under profile A, emit factura under profile B in same process, verify each landed in its own audit context
  • Idempotency cache must be RUC-keyed (it already is via the natural key)
  • `sunat audit list --ruc 20...` to filter by emisor
  • `sunat cpe profile use ` to switch active profile (currently CPE_PROFILE env)

Why P3

Most users have one RUC. Multi-RUC matters for accountants serving multiple clients.

References

  • LIMITATIONS.md → "Multi-RUC profiles never exercised"

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cpeCPE SOAP emission (factura/boleta/NC/ND/guia)enhancementNew feature or requestpriority:p3Nice-to-have, low priorityready-for-agentAFK agent should pick this up

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions