Repository navigation
fix: make the Testnet Nightly green and trustworthy - #10
Conversation
The nightly a11y spec has failed since 2026-09-11 on one landing node: a repo card's DPNS-resolved owner name, rendered text-dash (#008de4) on the identity pill's anvil-800 background, at 4.28:1 against AA's 4.5:1. The brand value is under 4.5:1 as text on every surface in both themes, so every dash-blue text use had the same problem wherever it rendered. The dash token becomes a small ramp: DEFAULT keeps the brand value for fills, tints and icons; 400 (#4aaef0) and 600 (#006bb0) are the text shades for dark and light surfaces. All six text uses move to text-dash-600 dark:text-dash-400; icon-only uses keep the brand value, which clears WCAG 1.4.11's 3:1 for graphics. A vitest pins the ratios against the tokens (including the 10% tinted badge) and fails on any raw text-dash that is not an icon, so a regression shows up in pnpm test, offline, not only in the live nightly. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… backoff One unreachable testnet DAPI node (212.47.68.199) cost every request that landed on it the OS TCP connect timeout, about two minutes on Linux, because the SDK sets no connect timeout. The node's ban lapses after a minute, and every git-remote-dash process starts with an empty ban list, so a git command that spawns the helper twice (a partial clone) paid it again and again. In the nightly this pushed scenario 07 past its command timeout and left the reject pushes of 02 and 04 failing on transport. PlatformClient now sets a 5 s connect timeout and 6 SDK retries (each on a different unbanned node). Reads (contract, identity, document, document queries, token balances/infos, counts) go through a bounded backoff loop (4 attempts, 2/4/8 s) for failures a fresh node rotation can fix: a retryable gRPC status from a node, and the SDK giving up after banning every node it tried, which the SDK's own CanRetry does not cover. The write re-broadcast loop uses the same classification and now backs off between attempts; it still re-sends the identical signed bytes, so a retry can only land the write once. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…f skip-scan read_refs discovered refs with the S0.8 skip-scan (one limit-1 query per ref per type) and then read each ref's history on its own: about four sequential round-trips per ref ever pushed, deleted ones included. Every git command on a dash:// remote reads refs at least once, and the nightly's test repo has ~80 refs across 170 updates, so it was ~300 queries and 75-80 s per ls-remote on testnet; a partial clone reads refs twice. Both ref-update types are now read whole, paged in $createdAt order (the reflog index), and grouped by refNameHash locally: ls-remote on the same repo takes 5 s and returns the identical 25 refs. Paging over the refState index (refNameHash, $createdAt) was tried first and dropped 5 of 168 updates at the page boundary on testnet, so it is called out in a comment. A document without a 32-byte refNameHash now fails the read instead of being skipped, since skipping it would make the answer wrong rather than partial. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…, pre-check opt-out fetch downloaded every stored pack one after another; with one pack per push that was ~50 s per fetch on the nightly repo (56 packs), and a partial clone fetches twice. Packs now download with the platform backend's pipeline window (8) in flight, order preserved, each still SHA-256-checked against its manifest. The push pre-check added on 2026-09-21 refuses a push locally when the identity holds no spendable token. It told a suspended collaborator 'no WRITE token on this repo ... fork it', which is false for them and the wrong fix; it now says the token is frozen and to ask a maintainer, worded unlike the consensus error so callers can tell a local refusal from a network verdict. DASH_FORGE_SKIP_WRITE_PRECHECK=1 turns the pre-check off, for callers that must see what consensus itself does with the push: e2e scenarios 04 and 05, whose headline claim the pre-check had silently replaced with a client-side refusal. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ading WARN lines Scenario 02 and headline scenario 04 had ended as SKIP every night since 2026-09-21, and they were not flaking. The helper logs every DAPI node it bans at WARN, even when the request then succeeds elsewhere, and is_flake grepped the whole stderr: a push that was genuinely rejected had 'transport error' WARN lines above its real error and was classified as a flake. is_flake now reads only git's output and the helper's final error, not its tracing records. Behind that, 04 and 05 were no longer testing consensus: the helper's 2026-09-21 no-token pre-check refused the push locally. Both now run with DASH_FORGE_SKIP_WRITE_PRECHECK=1 and FAIL if the refusal came from the pre-check. Every scenario command goes through timeout(1) with a KILL follow-up (the harness refuses to run unbounded), each scenario and the whole suite have their own budget, and a scenario over its budget is a FAIL with the matrix still written. git_dash_retry retries up to E2E_ATTEMPTS (3) with a growing pause, since a failing node stays banned for about a minute, and the negative pushes of 02/04/05 and the reads of 04/05/06/07 use it, so a flake has to repeat three times to become a SKIP. More than E2E_MAX_SKIPS (1) SKIPs fails the run. A killed clone's destination is removed before the retry (07's old retry FAILed on 'destination path already exists'), an unverifiable proof counts as a flake (06's 2026-09-17 FAIL), and cleanup deletes every test ref in one push instead of one push per ref. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
checkout, setup-node and pnpm/action-setup move to v5 and upload-artifact to v6, the first majors that run on Node 24; the runner has been force-upgrading their Node 20 builds with a deprecation warning. The CLI step gets its own timeout above the harness's 40-minute suite budget, warns when any scenario SKIPped (each SKIP now means a check flaked on every retry), and uploads the per-command .out/.err files so a failure can be read without re-running testnet. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…xed lines Review found the guard let text-dash/80 through (lower contrast than the brand value) and skipped any line containing aria-hidden, so visible text beside a hidden icon passed. Only a lucide icon element whose own props carry the class and aria-hidden is exempt now, plus one hand-checked icon-wrapper class; a second test pins those cases. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ozen token The parallel pack download called get_pack per pack, and get_pack re-fetched and re-verified the repo contract every time: 56 redundant proof-verified reads, 8 at a time, on the flaky network this branch is hardening against. RepoService gains get_pack_from, which takes an already-fetched contract, and fetch uses it. The pre-check's frozen message always said WRITE; a suspended maintainer who never held WRITE was told their WRITE token is frozen. frozen_grants now returns which grants are frozen and the message names them. The duplicated backoff formula moves into one backoff_delay. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…its its budget Review of the harness found four gaps. A timeout was classified as a flake, so a deterministic hang (the very 07 bug this branch fixes) would be retried, reported as a SKIP and tolerated; a timeout is now retried but is not a flake, so one that times out on every attempt FAILs. Killing an overrunning scenario did not kill its running command, because each timeout(1) is its own process group; commands now record their group and run.sh reaps them after every scenario and after cleanup, so an orphaned push cannot write while the next scenario runs. Cleanup assumed deleting an absent ref is a no-op, but the helper writes a zero-oid refUpdate for it; cleanup now lists the remote first and deletes only refs still there, in one push, with one attempt, inside a reserved slice of the suite budget. And the build ran inside the suite's time; the nightly now builds in its own step, so the suite budget, the step timeout and the job timeout nest. The three copies of the retry loop collapse into one _retry, which also keeps every failed attempt's stderr. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…s platform locators fetch passed a manifest's first URI to the platform backend whatever its storage tier. That was always wrong for external-tier packs (their URIs are ipfs:// or https://), and it was latent only until the test repo gained external-tier manifests: during this branch's own live runs, another session's BYO-storage e2e (run-id f6c5bff-1a4a) pushed four to the same repo, and every clone then failed with 'platform locator packHash not hex'. master has the same bug. The tier now picks the path, via RepoService::fetch_manifest_pack (the logic repack/reseed already used): chunk docs for platform tier, a hash-verified mirror race otherwise. An external pack whose mirrors are down (these point at a local minio) or silent for 90 s is skipped with a warning rather than failing the fetch; git verifies afterwards that every wanted object arrived, so a pack that was really needed still fails the fetch, while one holding only a deleted branch no longer holds every clone hostage. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedNext included review available in 21 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (20)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Status of the verification runs so far: Nightly on this branch, run 36114657037
Local full CLI suite (01–07) at the branch head. 01 PASS. 02's force push timed out at 200 s on its first attempt, while testnet nodes Follow-ups needed before the nightly can be green:
🤖 Posted autonomously by Claude on behalf of pasta. |
…cords dg --json prints its error as JSON on stdout, so dg_read_retry's stderr file was empty on failure: a transport flake in collab list / storage status was never retried and FAILed scenarios 04/05/06 instead of retrying. The stdout of a failed read is now appended to the error file. _final_errors dropped TRACE..WARN records but not ERROR, and rs-dapi-client logs 'request failed error=NoAvailableAddresses...' at ERROR for requests forge-core then retries successfully. That line matched is_flake, so a genuine rejection above it (02 non-ff, 04/05 consensus) was still retried and could SKIP. ERROR records are now excluded too; the binaries' final error never goes through tracing. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…leteness check Paging the refState index (refNameHash, $createdAt) with a startAfter cursor loses rows on testnet protocol 13: measured on the nightly repo, 197 of 229 updates came back. Drive's v0 lowering applies the cursor document's lower index levels to every sibling refNameHash branch, not only the cursor's own, so later refs lose rows and a page can come back short, which the pager reads as the end (the family of dashpay/platform#4396; this orderBy-only shape is still unfixed there). PR #10 worked around it by reading every update of every ref in reflog order on every command. Both clients now page refState by key: refNameHash > last, 100 rows, no cursor. Every ref but the last on a full page is complete, a ref that fills a page is read on its own with an equality query, and each round advances. A prevOid with no parent in the result (or an out-of-order page) falls back to the reflog read and unions by $id. On the nightly repo that is 3 queries returning the same 229 updates as the full read. base_ref_tips / readRefUpdates read one ref by equality. Mocks in both suites reproduce the sibling-branch drop. data-contracts §2.3 and design-freeze-2 now describe this. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…leteness check Paging the refState index (refNameHash, $createdAt) with a startAfter cursor loses rows on testnet protocol 13: measured on the nightly repo, 197 of 229 updates came back. Drive's v0 lowering applies the cursor document's lower index levels to every sibling refNameHash branch, not only the cursor's own, so later refs lose rows and a page can come back short, which the pager reads as the end (the family of dashpay/platform#4396; this orderBy-only shape is still unfixed there). PR #10 worked around it by reading every update of every ref in reflog order on every command. Both clients now page refState by key: refNameHash > last, 100 rows, no cursor. Every ref but the last on a full page is complete, a ref that fills a page is read on its own with an equality query, and each round advances. A prevOid with no parent in the result (or an out-of-order page) falls back to the reflog read and unions by $id. On the nightly repo that is 3 queries returning the same 229 updates as the full read. base_ref_tips / readRefUpdates read one ref by equality. Mocks in both suites reproduce the sibling-branch drop. data-contracts §2.3 and design-freeze-2 now describe this. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…e spec its own repo Review #3: the seeder pushes with git -c dash.storage=platform (command scope outranks any global or per-remote setting) and no platform fallback, and 'already seeded' now also requires every manifest to be a Platform-stored kind-0 pack with no browse index; it checks the same after a push. Review #10: auth-write.spec's E2E_WRITE issue goes to WRITE_FIXTURE (m1-75299), never the read fixture. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Problem
Testnet Nightly has failed every night since 2026-09-11. Run 35989436566 shows three separate failures. I traced each one to a different root cause.
1. Playwright
a11y.spec.ts:51, landing color-contrast. One node failed, not 58. Once a repo card resolved its owner's DPNS name, that name rendered intext-dash(#008de4) on the identity pill'sanvil-800background, at 4.28:1; WCAG AA requires 4.5:1. The brand blue fails 4.5:1 as text on every surface in both themes, so each dash-blue label had the same problem wherever it rendered.2. CLI scenario 07 ran until the 60-minute job timeout. It was not a promisor-fetch loop and not the helper waiting on stdin. Under
GIT_TRACE, the live partial clone runs exactly two helper processes (the clone fetch plus the one post-checkout promisor fetch) and finishes. It was just very slow, for three reasons:read_refsskip-scan. Refs were discovered with a per-ref skip-scan, then each ref's history was read separately. That is about 4 sequential round-trips per ref ever pushed, deleted refs included. The nightly's test repo has about 80 refs across 170 updates, so everyls-remote/listmade about 300 queries and took 75–80 s. A partial clone reads refs twice.Serial pack downloads.
fetchdownloaded all 56 stored packs one after another, about 50 s per fetch, twice per partial clone.No connect timeout. The SDK sets no DAPI connect timeout. One unreachable testnet node (
212.47.68.199) cost every request that landed on it the OS TCP timeout, about 2 minutes on Linux. Its ban lapses after a minute, and every helper process starts with an empty ban list.Together these pushed each command past the harness's 200 s timeout. The retry then FAILed with
destination path ... already exists, because the killed clone had left its directory behind (runs of 09-17 to 09-23). On 09-24 the last command hung in a way the timeout did not clean up and consumed the job.3. Scenarios 02 and 04 SKIPped as "transport flake", but they were not flaking. The helper logs every DAPI node it bans at WARN, even when the request then succeeds on another node, and
is_flakegrepped the whole stderr. A push that was genuinely rejected hadtransport errorWARN lines above its real error, so the rejection was classified as a flake. Separately, 04 and 05 had stopped testing consensus: the helper's 2026-09-21 no-token pre-check refused the push locally before anything was broadcast. In 04's case the refusal message also wrongly told a frozen collaborator they had "no WRITE token" and should fork.What changed
Web (the contrast fix; the test is unchanged)
dashbecomes a small ramp.DEFAULTkeeps the brand value for fills, tints and icons.dash-400(#4aaef0) anddash-600(#006bb0) are text shades for dark and light surfaces. On the page surfaces the app uses (white/anvil-50/100 light, anvil-950…800 dark) they reach 5.2–7.9:1 plain and at least 4.6:1 on the 10% tinted network badge.text-dash-600 dark:text-dash-400. Icon-only uses keep the brand value, which meets WCAG 1.4.11's 3:1 for non-text graphics.lib/design/contrast.test.tspins the ratios against the tokens and fails on any rawtext-dash(ortext-dash/NN) that is not an icon. A regression now failspnpm testoffline, not only in the live nightly. The style guide documents the rule.forge-core
PlatformClientsets a 5 s DAPI connect timeout and 6 SDK retries, each on a different unbanned node.CanRetrycovers.read_refsreads both ref-update types whole, paged by$createdAt, and groups them locally.ls-remoteon the test repo drops from ~78 s to 5 s with an identical ref list. Paging over therefStatecompound index was tried first and dropped 5 of 168 updates at the page boundary on testnet (one ref vanished), so that approach is called out in a comment. See "Left undone" for the other callers of that index.git-remote-dash
fetchused to pass a manifest's first URI to the platform backend regardless of storage tier. That broke as soon as the test repo gained external-tier manifests: during this work another session's BYO-storage e2e pushed four, whoseipfs:///http://127.0.0.1:9000mirrors made every clone fail withplatform locator packHash not hex. master has the same bug. The tier now picks the path (the onerepack/reseedalready used). A pack whose mirrors are down, or silent for 90 s, is skipped with a warning; git still checks afterwards that every wanted object arrived.DASH_FORGE_SKIP_WRITE_PRECHECK=1disables the pre-check so the e2e ACL scenarios can observe consensus.e2e harness (
e2e/cli/)timeout -k, and the harness refuses to run without one. Each scenario, and the whole suite including cleanup, has its own budget. An overrunning scenario is a FAIL, the matrix is always written, and the scenario's in-flight commands are reaped. They run in their own process groups, so killing the scenario alone left them writing.is_flakeignores tracing records and reads only git's output and the helper's final error. An unverifiable proof counts as a flake (06 FAILed on one on 09-17)._retry: up to 3 attempts with a growing pause, because a failing node stays banned for about a minute. The reject pushes of 02/04/05 are retried until they get a verdict, and 04/05 bypass the pre-check and FAIL if a refusal came from it. A timeout is retried but is not a flake: a command that times out on every attempt FAILs, so a real hang can never pass as a SKIP.E2E_MAX_SKIPS=1), so a flake can become a SKIP at most once.refUpdate).Workflow
checkout@v5,setup-node@v5,pnpm/action-setup@v5,upload-artifact@v6..out/.errlogs are uploaded as an artifact.Verification
cargo fmt --all -- --checkcargo clippy --locked --workspace --all-targets -- -D warningscargo test --locked --workspacepnpm typecheck/pnpm lint/pnpm testpnpm buildplaywright test a11y.spec.ts, live testnet, local.text-dash.font-medium, 4.28:1); after: 2/2 pass, 0 serious/criticalclone --filter=blob:none).promisorwritten,remote.origin.promisor=true, fsck cleangit ls-remoteon the test repoaccount is frozen for token …at consensus; 05required 1, actual 0at consensus; 07 depth rejected loudly and partial clone works. Batched cleanup deleted the 3 test refs.platform locator packHash not hex; after: passes in ~60 s, skipping the 2 unreachable external packs with a warning;.promisorwritten, fsck cleanactionlint,shellcheck -S warningSCENARIO_NAME)Not verified
127.0.0.1:9000minio). A reachable IPFS/HTTPS mirror succeeding throughfetchwas not live-tested;repack/reseedalready use the same code.Left undone
collab.rs::base_ref_tips(Rust) and forge-web'sreadRefUpdates/ fast-pathreadAllRefUpdatesOnePagestill page or order over therefStateindex. A branch with more than 100 updates could hit the same boundary loss seen here. That needs its own reproduction and fix; it is out of scope for making the nightly green.read_refsnow costs ⌈total updates / 100⌉ pages per call instead of about 4 queries per ref. That is far cheaper for the test repo and any repo with few updates per ref, but it grows with push history. A repo with 100k+ updates would hitIncompleteReadfor the whole ref set, where before only a single ref with that many updates would. A snapshot or checkpoint document is the real fix and belongs with the browse-index work.m1-75299) with other e2e suites. The BYO-storage run wrote external-tier packs pointing at a local minio, which every nightly clone now downloads, tries and skips. The suites should use separate repos.🤖 Generated with Claude Code