Repository navigation
fix(codegen): read Attio's description and sample what its fake must answer - #642
Merged
Merged
Conversation
leemour
added a commit
that referenced
this pull request
Nov 17, 2026
…token on another host (#643) ## Why The WordPress foundation in the CLI factory plan: WordPress application passwords sign in by HTTP Basic. `signInPlace` returned `undefined` for a `basic` scheme, so: - cli-core kept its own `basicPlace` in `service-api-manifest.ts` (cli-core #3094); - a CLI's `fakeApi` could not check Basic, and refused every correctly signed request with 401; - `fakeApi`'s leak check looked for the raw token only, and a Basic header carries it in base64, so the token sent to another host went unnoticed. ## What - `signInPlace` returns `Authorization: Basic <base64 of user:password>` for a `basic` scheme and marks the place `basic: true`. Digest stays `undefined`. - `fakeApi` also looks for each scheme's signed value when it checks that the token did not go to another host. - A changelog entry under "Changed — may break callers": cli-core told Basic apart by `undefined`. When it bumps to this version, it drops `basicPlace` and reads `place.basic`, so that a token scheme stays first when a call offers both. No overlap with #642: that PR changes `sampleOf` in `fake.ts` (lines 232–280); this one changes the sign-in check (lines 360–410). ## Testing - A new `fakeApi` test: a Basic sign-in passes, a wrong password gets 401, and the Basic header sent to another host is refused. Without the change the first check fails with 401, and without the leak fix the third passes through. - Locally: typecheck, lint, docs:check, the full suite (1252 tests) and the coverage floors pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…answer
- sampleOf takes the union branch with the most required fields: Attio's /v2/self
answered { active: false } first, so a sign-in check found no workspace id
- a pattern of groups, alternatives or a wildcard gets a sample it takes
- prefixItems as a list of its places, an allOf of unions as its first member,
and min/maxProperties skipped: each stopped generation
- a PUT on a collection beside a PUT on its item is named -upsert
Started by the coordinator's agent, finished by the Attio pilot session
(FIND-2749, FIND-2750, FIND-2751, FIND-2752).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…amples keep length bounds - the allOf-of-unions shortcut applies only when no branch holds an object, a ref or an allOf: a value may need fields from two unions, which the first alone refuses - a pattern's sample is the first of the pattern's own, common guesses and the plain string that the pattern and minLength/maxLength take - a test for the . atom and for length bounds; the union choice moves to Changed, with its reach on Notion's description Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
leemour
force-pushed
the
fix/attio-pilot-gaps
branch
from
November 17, 2026 23:37
ed42864 to
56a7830
Compare
Merged
leemour
added a commit
that referenced
this pull request
Nov 17, 2026
Carries #642 (Attio: union samples, pattern samples, prefixItems, allOf of unions, upsert), #643 (Basic sign-in) and #644 (tracker nouns). Minor: the Unreleased section has Added and Changed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Task
The Attio pilot (
attio-cli, the first CLI built only fromwirecat.config.ts) could not generate from Attio's OpenAPI description, and its tests failed againstfakeApi.Why
prefixItems, anallOfof two unions andminProperties/maxProperties, and on a name clash between a PUT on a collection and a PUT on its item.sampleOftook a union's first branch: Attio'sGET /v2/selfanswers{ active: false }first, so a sign-in check against the fake found no workspace id.^https:\/\/.*, ISO 8601 durations) sampled asxxxxxx, which the strict fake then refused.What
sampleOftakes the union branch with the most required fields (Changed — may break callers: Notion's description samples 92 of 609 definitions differently; HubSpot, ydisk, Drive and Calendar sample as before).minLength/maxLengthtake.prefixItemsas a list of its places, anallOfof unions of plain values as its first member (one with an object branch is still refused), and skips the property counts.-upsert.Started by the coordinator's agent (stopped on its weekly limit), finished and reviewed by the Attio pilot session. Reviewed by a fresh agent; its findings (object unions, length bounds, the
.atom test, the changelog heading) are fixed in ed42864.Testing
pnpm test: 1256 passed; lint, typecheck,docs:checkclean.🤖 Generated with Claude Code