company show: drop payment_configs GET entirely - #148
Merged
DamoneMX merged 3 commits intoJul 23, 2026
Conversation
DamoneMX
force-pushed
the
aint-786-skip-payment-configs-for-non-partner-managed
branch
from
July 21, 2026 19:53
d90cbc8 to
58fab6d
Compare
Collaborator
|
I am thinking we should remove the ability to GET payment configs. I don't think we will have partner-managed companies going through this flow but should get confirmation from Cathy Slack |
…partner-managed The endpoint gates on an active PartnerCompanyMapping, so firing it for a company whose response has is_partner_managed: false always 404s and generates a CanCan::AccessDenied on Embedded Pay's error dashboards. Gating the call on the company response makes the invariant explicit at the call site and retires the client-side 404 suppression as the single source of truth. Envelope shape is unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Arie Radilla <arie.radillalaureano@gusto.com>
Remove the API call to avoid 404s from non-partner-managed companies. - Remove the payment_configs GET from `company show` unconditionally - Drop payment_config from the response envelope and payment_speed from the summary (breaking change to the --agent JSON shape) - Drop the is_partner_managed gate and the PaymentConfig type - Move company_payment_configs:read from REQUIRED_SCOPES to DROPPED_SCOPES (no longer used by any command) - Reduce parallel GETs from three to two - Update company + oauth tests; the network test now asserts the /payment_configs endpoint is never called (anchored regex) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Signed-off-by: Arie Radilla <arie.radillalaureano@gusto.com>
DamoneMX
force-pushed
the
aint-786-skip-payment-configs-for-non-partner-managed
branch
from
July 22, 2026 20:04
58fab6d to
8ee1aa2
Compare
ashieh
approved these changes
Jul 23, 2026
Collaborator
|
Code looks good. I think we should drop the reference to AINT-786 in the PR title. |
DamoneMX
deleted the
aint-786-skip-payment-configs-for-non-partner-managed
branch
July 23, 2026 22:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gusto company showwas firingGET /v1/companies/{uuid}/payment_configsin parallel with the primary company GET. The endpoint gates on an active
PartnerCompanyMapping, whichgusto auth logindoesn't create, so thecall always 404s with
CanCan::AccessDeniedfor the companies this CLIcurrently serves. The CLI suppressed the 404 client-side, so the failure
was invisible to users but still hit Embedded Pay's error dashboards. Over
the last 8d, 27 invocations, 100% errors.
is_partner_managed. Alongside the GET:payment_configfrom the--agentJSON envelope andpayment_speedfromsummaryPayment speedline from human-readable outputPaymentConfigtype andis_partner_managedfrom theinternal
CompanyRecordtypecompany_payment_configs:readfromREQUIRED_SCOPEStoDROPPED_SCOPES(no in-surface command needs it now)/v1/companies/{uuid}and/v1/companies/{uuid}/pay_schedules). Breaking change to the--agentJSON envelope shape.
Test plan
bun run typecheck,bun run lint,bun run format:checkpassbun test src/commands/company src/lib/oauth→ 76 pass / 0 fail. Thenetwork test asserts the
/payment_configsendpoint is never calledusing an anchored regex (
/companies/[^/]+/payment_configs(?:$|\?)/).bun test→ 1134/1135. The one failure(
--check exits 0 when NOTICES is current) is pre-existing onorigin/main, unrelated to this change (drift from other PRs mergedtoday, verified by running the script from a clean
origin/maincheckout).
bun run buildcompiles clean.wire (
/v1/companies/{uuid},/v1/companies/{uuid}/pay_schedules);envelope shape validated by unit tests (no
payment_config, nosummary.payment_speed).