Repository navigation
docs: list every import warning and GitHub error code in CONTRACT (#1124732) - #82
Merged
Merged
Conversation
…124732) CONTRACT named one warning code where the server defines five, and two import_github_* codes where the server defines eight. It also said a bad token answers 400 import_github_auth; on agile-tracker origin/main 79f2240e4 that code arrives as a failed job's error_code. - Add a warning table: each code, the story that added it, and whether a GitHub import can raise it. estimates_unpointed_dropped cannot: the GitHub connector sets no estimate, and the pre-check ignores github. - Add a GitHub error table: each code, its story, where it arrives (400 on the POST or a failed job's error_code), and when the server raises it. - Test warningLine against each of the five server shapes; the floor-year test is separate from the four count-only tests. - Test that both CONTRACT tables list exactly the codes the tests cover. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…view) - Guard both tables against a duplicated row: assert the row count and the sorted code column before Object.fromEntries. - Assert each table's separator row and the cell count of every row. - Derive the prose counts from the parsed tables and assert that CONTRACT states the matching numbers. - Pin the bare `note: <code>` line for an entry with no count and no floor_year. - Pin the stderr line of a coded 400 refusal for both pre-job codes; the shared-quota body runs past the client's 200-character cut. - Pin the stderr line of a failed job, with today's doubled prefix. - Rename the error-code test so it claims CONTRACT only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…review) Checked against agile-tracker origin/main 79f2240e4. - Rate limits: send_retrying retries an HTTP 429 or rate-limited 403 up to 3 times and skips the retries when GitHub asks for a wait over 120 s. It never retries a GraphQL RATE_LIMITED, which arrives in a 200 body. - rate_limited_platform: the shared PAT hit a primary or secondary limit. - Scope the job-code rows to the listing queries and list the verified exceptions: the blockedBy rule (#384801), the first-error rule, a blockedBy follow-up page error (dependencies_truncated), and a comment follow-up NOT_FOUND (import_github_unavailable). - unavailable: add an unclassified GraphQL error type and a schema field that the server cannot drop. - Quote the stderr lines the user sees, including the doubled "import failed:" prefix of a failed job and the --token hint. - cross_reference_links_failed needs include_pull_requests. - A malformed token is 400 invalid_parameter before a job exists; only a token that GitHub rejects fails the job with import_github_auth. - State the note template for a count of 1 and for an entry with neither field. Co-Authored-By: Claude Opus 5.5 (1M context) <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.
Summary
CONTRACT.md named one import warning code (
history_floor_clamped) where the server defines five, and twoimport_github_*error codes where the server defines eight. It also said a bad token answers400 import_github_auth. On agile-tracker origin/main79f2240e4, that code arrives as theerror_codeof afailedjob, not as a400.This PR adds two tables to CONTRACT.md and pins both with tests. No
src/change:warningLinealready renders all five server shapes correctly.After the review panel, CONTRACT.md also does these things:
blockedByrule (#384801), the first-error rule, ablockedByfollow-up page error, and a comment follow-upNOT_FOUND.RATE_LIMITED.import failed:prefix of a failed job. Another story covers that prefix.Story: https://eastagiletracker.com/s/zewsdmja (#1124732)
Warning codes (
ImportResult.warnings)history_floor_clampedfloor_yearcross_reference_links_failedinclude_pull_requests, committing run only (matches the dry-run paragraph from #81)dependencies_fetch_failedinclude_dependenciesdependencies_truncatedinclude_dependenciesestimates_unpointed_droppedcheck_unpointed_estimatesforgithubGitHub error codes
import_github_no_token400response to thePOSTimport_github_shared_quota_low400response to thePOSTimport_github_autherror_codeof afailedjobimport_github_forbiddenerror_codeof afailedjobimport_github_not_founderror_codeof afailedjobimport_github_rate_limitederror_codeof afailedjobimport_github_rate_limited_platformerror_codeof afailedjobimport_github_unavailableerror_codeof afailedjobCONTRACT.md also says when the server raises each code. Every row was read from agile-tracker origin/main
79f2240e4(validate_github_request,ensure_shared_pat_budget,github_fetch_error,job_error_parts,From<GithubImportError> for AppError,http_status_error,classify_gql_errors).Amended acceptance criteria
The user widened the error list from four codes to all eight
import_github_*codes on agile-tracker origin/main.Tests
history_floor_clamped renders its count and its floor year: one exactnote:line.<code> renders its count and no floor year, once for each of the other four codes: one exactnote:line, and the output contains nofloor year.CONTRACT.md lists exactly the warning codes the renderer tests cover: set equality between the CONTRACT table and the five tested codes.CONTRACT.md marks estimates_unpointed_dropped as the one code a GitHub import cannot raise: the Yes/No column.CONTRACT.md's error-code table lists eight import_github_* codes and where each arrives: row count, sorted code column, then the arrival cell of each row. A duplicated row fails it.CONTRACT.md's warning counts match its warning tableandCONTRACT.md's error-code counts match its error-code table: the prose counts come from the parsed tables.contractTableasserts the separator row and the cell count of every row.a warning with neither count nor floor_year renders the bare code.a 400 <code> refusal names its code on stderr, once for each of the two pre-job codes, with the server's own message. The quota body is 243 characters, so it runs past the client's 200-character cut.a failed job prints its error under a doubled import-failed prefix.Red first:
CONTRACT.md has no table headed ...).warningLine:floor year: the four count-only tests fail.floor_year: the floor test fails.count: all five fail.NotoYes, and changing an arrival cell each turn the matching test red.error:prefix. The previousfromEntriestest stayed green against the duplicated error row.Gates:
npm test:# tests 1300,# pass 1299,# fail 0,# skipped 1(the opt-in e2e), rc 0npm run lint:Found 1 warning.Found 1 info.(both pre-existing:src/mockserver.js,biome.json), rc 0npm run typecheck: rc 0🤖 Generated with Claude Code