Repository navigation
Release 1.0.0-alpha.12: client.lists; unknown config keys refused; a handed-in built-in transport no longer resends twice over - #68
Merged
Conversation
… a name means Over api/ValidValues, which applies the scope's scheme and the team's process. lists.values answers rows per attribute for an asset or for a type in a scope (and on a team); lists.value resolves a name or an OID to the one valid value, or throws NO_SUCH_VALUE / AMBIGUOUS_VALUE with the candidates as rows. Only relations to a list type are asked for: the endpoint cannot be paged or filtered. fields.describe says which attributes are list-typed; the fake scripts values with onValues. Proved live on fixtures of the suite's own (a scope with its scheme, a team with a process, a team without), each deleted by exact OID. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm
…ection Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm
…ake says when an attribute was not scripted Two consumer findings. A schema missing Status or List made the service conclude 'not a list type' and advise another read. And the fake, with no metamodel, refused Owners in words a server's metamodel would not produce. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm
…d-only, and guarded from cleanup Four assets named sdk-reference are there to stay (AGENTS.md lists them). deleteFixtures reads the names first and refuses a list that holds any of them; the live lists test reads the reference team's statuses; spec 000 no longer says the instance has no story status. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm
…cheme They carry the product's own names, so the cleanup guard knows them (and the reference team's four, the default scheme and the system project) by OID as well as by the sdk-reference prefix. AGENTS.md lists all nine; a read-only live test asserts what the system project offers. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm
jallers
marked this pull request as ready for review
November 26, 2026 18:18
AGENTS.md said all five scheme statuses read Active; two now read Closed. The live test asserts each status's RollupState. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm
…imeout rules twice The client could not tell that a transport it was handed was the built-in one and wrapped it again, so a failed read was sent four times instead of two. The transport createFetchTransport returns now declares that it applies both rules itself. The client's config also takes fetchImpl, so a fetch of the caller's own no longer needs a transport. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm
…e place; count attempts for every way of building a client Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm
…hing is applied; conformance cases for a 401 with a body Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm
new AgilityApiClient, createFetchTransport and new FakeAgilityClient throw a UsageError at construction for an unknown key: it names the key, suggests the nearest known one, and never repeats a value. A misspelt or misplaced option was ignored without a word, which a compiler tells a TypeScript caller and nothing told a JavaScript one. Each factory's key list is tied to its config type and does not compile if they drift. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm
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.
Up to date with
master, which has the integration-tier hardening and alpha.11; the diff is this release alone.Breaking
A config object with a key its factory does not know is refused.
new AgilityApiClient(config, options)(both objects),createFetchTransport(config)andnew FakeAgilityClient(config)throw aUsageErrorat construction for a key that is not theirs. Until now such a key was ignored without a word; a compiler tells a TypeScript caller, and nothing told a JavaScript or JSDoc-checked one (a consumer'sfetchImplon the client's config did nothing for several releases)."retrys" (did you mean "retries"?)), lists the keys the factory takes, and never repeats a value: a config holds credentials. A test puts a secret in the config and asserts it is in neither the message nordetails.undefinedincluded: the name is the mistake. A known key may beundefined.transportandtypesgo in the client's second argument;onErroris the client's, not the transport's) and a config object shared with other code that added keys of its own.Fixed
A built-in transport handed to a client was given the resend and timeout rules a second time. With
new AgilityApiClient(config, { transport: createFetchTransport({ …, fetchImpl }) }), until now the only way to supply afetchof one's own, a read that failed with a 5xx, a 429 or a lost connection was sent four times instead of two. Present since alpha.5; found by a CLI consumer in published alpha.11. No write was ever resent by it, and nothing is resent after a timeout.createFetchTransportreturns now declares that it applies both rules itself, and the client adds neither, whether it made the transport or was handed it. Its ownretriesandtimeoutMsare then the ones that count. Spec 000 §6 states the invariant: each rule once, in one place.Retry-After.retries: 0, timeoutMs: 0.Changed
More is known about
"retry-write"(no behaviour change). A browser-app consumer checked the case that matters most to a browser, a credential that had been valid and expired: on one product release an api/asset batch of creates and a rest-1 attribute write were each answered 401 and not applied, and a query.v1 read got the same 401; no 403 and no redirect was seen. The doc comment, spec 000 and example 09 say so. Still not checked: a 403, other releases, other ways of signing in. A 401 can carry a body or none; all arekind: "auth", andtransportConformancehas each as a case.Added
fetchImplin the client's config: thefetchthe built-in transport calls.client.lists: which values a list-typed attribute (Status, Priority, Source, Category, a custom dropdown) may take, and the one a name means. It asks the server's api/ValidValues, as the product's own pickers do.lists.values: a map from attribute to rows{ _oid, Name, …selected }in the list's own order. One request per attribute, one after another. Nothing is cached.lists.value: the whole name, ignoring case and surrounding space; an OID is accepted and checked to be among the valid values;match: "prefix"also takes the start of the name or of a word in it. It never picks among several:NO_SUCH_VALUEorAMBIGUOUS_VALUE(bothkind: "invalid"), each with the candidates as rows indetails.values.client.fields.describe(type, scope)gainslists: which of a form's attributes are list-typed, and the list type of each./wire:validValues.forAsset/forNew./services:lists./testing:fake.onValues({ Status: rows })andfake.valuesAsked.examples/12-list-values.ts, a README section "List values", a paragraph in spec 000 §6.What the server does (proved live)
The integration test brings a world of its own: a Scope under the system project with its own Scheme, global statuses and priorities in and out of that Scheme, a Team that owns three statuses (one inactivated), a Team that owns none, and a Story on each team and on none.
{ asset }alone applies it.PrimaryWorkitem)teamoidis silently ignored in that form and the scheme's values come back; a semicolon is a 400.Violation'PrimaryWorkitemCannotHaveInvalidStatus). A status the scope's scheme does not select is accepted. So the list is what to offer, andlists.valueis what keeps a name from becoming a value the project does not use.selectrefuses a date.Decisions a reviewer should know
Owners,Team,Timeboxand the like the service throws aUsageErrorbefore sending, naming the bounded read to use. The/wiremodule is the endpoint as it is, and its header says so.fields.describegrew a key. A consumer that compares its whole answer withtoEqualaddslists.NOT_FOUND). And the fake, given no metamodel, refused an unscripted attribute in words a server's metamodel would not produce; it now says in its own words that nothing was scripted.Reference data on the testing instance
The API-testing instance now holds nine permanent assets, put there by its owner so consumers can prove valid values against real data: a team with its own process and its three statuses (named
sdk-reference …), and five global story statuses with the product's own names, selected in the default scheme (three roll up as Active,DoneandAcceptedas Closed). This pull request:deleteFixturesrefuse, before any request, a list that contains any of those OIDs, the default scheme or the system project, and refuse anything namedsdk-reference(it reads the names first);Verification
At the head commit (7fbe4f4):
npm run verify: 289 unit tests in 36 files, all passing.Required<Config>, compared with the list); theundefinedrules; no value in the message or details; a client made bywithSignalnot refused.Retry-Afterand a timeout: 2, 2, 2 and 1 in all three; a timeout ends at one deadline.lists.test.ts(10 tests) and all twelve examples. The nine permanent assets read back as described.client.lists: a CLI consumer (fake, refusals, and a read-only live call returning the reference team's statuses in order) and a chat-bot consumer (its suite passing; live, the same statuses as its previous two-query path in both the team and the scheme context, and a name resolved and written on a fixture story of its own).After merge
Tag
v1.0.0-alpha.12to stage the publish.🤖 Generated with Claude Code
https://claude.ai/code/session_01Rgicmffzzwb2CzyeDSEhBm