Repository navigation
test(platform): require every backend:integration lane to run and pass - #3981
Conversation
A run could skip a lane and still pass: without ITEST_S3_ENDPOINT twenty-five blob checks recorded themselves as passing skips, and a few more passed their blob half silently. ITEST_REQUIRE_ALL_LANES=1 now asks for full coverage. The harness refuses to start with a lane filter or without all three ITEST_S3 variables, and every skip goes through recordSkip, which records a failure in such a run and a counted skip otherwise. Lanes read the harness's variables only through the lane helpers, and a guard holds both rules.
The erasure race lane made the suite's shared user an owner of two throwaway organizations and never took that back. From then on every /api/v1 call on that user's keys answered ORG_SLUG_REQUIRED, the refusals drained the key holder's budget, and ten REST checks forty lanes later failed, the last ones on 429. Filtered runs never showed it. The race now gives its organizations an owner of their own, and the harness fails any lane that changes the shared user's memberships, naming the lane.
The ask bell check expected exactly one bell, but by then other lanes have added admins to the shared organization; it now wants one unread bell for the owner and one row per recipient. The workspace-tool door provisioned a project agent session under a made-up id, which the door serves only as the agent's standing session since members may start agent runs; it now provisions the standing session. The embedding refusal lane read the re-queued job the moment the file finished indexing, just before pg-boss completes the job; it now waits for both.
|
At reviewed head Bounded local controls evaluated the exact source predicate, extracted with the TypeScript AST, using inert rows. All three passed: the valid owner + eligible admin; owner only, omitting that admin; and owner + admin + an unauthorized ordinary member. This demonstrates a test-oracle gap, not an observed production notification leak. Please independently establish the expected eligible owner/admin IDs from controlled fixture membership and notification preferences, then compare exact recipient sets. Preserve uniqueness, unread, fold and dismissal assertions, and add missing-eligible / unexpected-recipient negative controls. Deriving the expected set from the returned bells or the production audience helper would repeat the same blind spot. |
checkRecoverySweeps passed its adoption half through `!corpusSeeded ||` when the seed INSERT into private_knowledge.documents threw, so a required run stayed green without proving that finished work is adopted. tale-db ships the corpus and other lanes write to it with no fallback: a failed seed now fails the check and names the error.
The whole-run relaxation of the ask-bell check only asked for one bell for the owner and one row per recipient, so a fan-out that reached every member, or skipped an admin, still passed. An ask with no project rings the organization's owners and admins who kept escalation bells on: the check now reads that audience beside the bells, requires the two sets to match, and prints what is missing or stray.
The guard scanned only `*.integration.ts` and `*-integration.ts`, so the REST proofs the harness imports lazily (`rest/*-check.ts`) went unread, and it matched only `process.env.ITEST_X` and an upper-case `(SKIPPED)`: a destructuring, an optional chain or a lower-case `(skipped)` got past. It now reads `*-check.ts` too, judges env reads on the syntax tree (any ITEST_ key off process.env, and any code that names one of the harness's own variables), matches `(skipped)` in any case, and fails a lane that only tells the console it skipped something. The status-hints lane's seed message says "failed", which is what it counts. The helper and guard comments describe the flag's intent rather than a CI job that does not exist yet.
The README said both media probes run ffmpeg from PATH. Only the transcription probe does: the video-link probe hands yt-dlp an explicit `--ffmpeg-location`, `VIDEO_INGEST_FFMPEG_LOCATION` or else `/usr/bin/ffmpeg`, and never reads PATH. Say so, and when to set it.
The ask-bell check compared the bells with an audience it read from the shared organization by the same rule the fan-out applies, so a rule wrong on both sides still passed, and that organization held no member the rule must leave out. The scenario now runs in an organization of its own with an owner, an admin, an admin whose other preferences are off, a plain member, a disabled member and an admin who turned escalations off. The bells on create and on the fold must go to exactly the first three, one each, and the answer must read every one of them.
|
Thanks. The point holds: 2b66586 (rebased on top of 7e76220…4706a6132, superseding only a093a63's bell section) runs the scenario in an organization of its own. The lane sets its members and preferences:
The expected set is written down from that table, never read from the bells or the rule. Three things must match it exactly, as sorted id lists, so a missing, doubled or stray recipient each fail:
The unread, fold and dismissal assertions stay; the answer now goes through the fixture owner's own session. Negative controls. I mutated the product rules in
Whole run at this head plus #3980, |
|
The original recipient-oracle blocker is resolved at This accepts the source correction; it is not a passing complete backend integration campaign. The author reports |
|
Normal CI is now complete at the same head For the workflow-scope limitation, please provide the prepared public-source workflow commit as a fenced The workflow review must also preserve candidate-source binding: the new job should test the resolved candidate SHA and feed the existing candidate receipt gate on release-candidate dispatch, as well as the normal PR/main paths. No stale Turbo verdict or silent lane skip can satisfy this gate. |
Summary
Part of TALE-382 (run
backend:integrationin CI). Before CI can gate on the suite, a whole run has to cover every lane and pass. It did neither onmain:ITEST_S3_ENDPOINT, twenty-five blob checks recorded themselves as passing(SKIPPED)checks. A few more passed their blob half silently: the hard-delete blob reclaim, the vanished-attachment chip, the settled-donor dismissal and the org-teardown blobs.main(see Test plan), 20 of 1190 checks failed.checkErasureReviewHandoverRacesmade the shared user an owner of two throwaway organizations and never took that back. From then on every/api/v1call on that user's keys answeredORG_SLUG_REQUIRED, the refusals drained the key holder'srest:apibudget, and the REST lanes forty lanes later failed, the last ones on 429.ITEST_LANES) never showed it.What changes
ITEST_REQUIRE_ALL_LANES=1asks for full coverage.ITEST_S3_*variables.recordSkip(backend/integration-lane-helpers.ts), which records a failure in such a run and a counted skip otherwise. The tally now says how many checks were skipped.tests/guards/integration-skips.guard.test.tsholds both rules.A lane that changes the shared user's organization memberships fails, and the failure names the lane. The erasure race lane now gives its organizations an owner of their own.
Three lanes are held to what a whole run looks like.
pa-<agentId>), so the check now uses the standing session, and so do feat(platform): name the serving release in workspace_status #3972's status tokens.Pushed onto this branch by a reviewer, kept as is:
checkRecoverySweepswhen its corpus seed fails, which was another silent pass;*-check.ts, to syntax-tree env reads and to lower-case skips;The CI job itself is not in this PR.
GITHUB_TOKEN_TALEcannot push.github/workflows/*: the push was refused for the missingworkflowscope. The job is a ready commit that sits on top of this branch, described below.Checklist
bun run checkpasses — N/A locally: the sandbox's 4 GiB cap cannot hold the platform-wide gates. The changed files were checked as listed under Test plan, and CI runs the full gate.bun run lint:sastpasses — the pre-commit hook ran Opengrep on the staged files; CI's Opengrep job runs it in full.docs/{en,de,fr}/— N/A: no user-visible change.services/platform/backend/README.mddocuments the flag and the membership rule.README.md— N/A.Test plan
Full local runs on PostgreSQL 16.13 with pg_search 0.22.6 and pgvector 0.8.1 (the versions
tale-dbships), theghcr.io/tale-project/ops/minio:RELEASE.2025-04-22T22-12-26Zbinary (the CLI'sobject-storepin), and ffmpeg/ffprobe onPATH. All 204 lanes ran every time.main@ ab45722main@ 0e7cf2d, withITEST_REQUIRE_ALL_LANES=1ITEST_REQUIRE_ALL_LANES=1The 8 that still fail are all network lanes, and they fail only because this sandbox has no DNS and no direct egress:
openrouter.ai/ai-gateway.vercel.shcatalogs time out after 3×10 s and the send answers 500;dns.resolve4gets no answer, so they end ondnsResolutionFailed;api.anthropic.comtimes out after 10 s;Through the sandbox proxy the endpoints answer at once: openrouter 200, vercel 200, anthropic 401 in under 0.25 s. So a GitHub runner should pass them; the first CI run will confirm. Note that the suite reaches these vendors: an outage of theirs can turn the CI job red.
Controls:
main's erasure lane (ITEST_LANES=checkErasureReviewHandoverRaces), fails withharness: checkErasureReviewHandoverRaces leaves the shared user's organizations as it found them — before=[<shared org>:owner] after=[<2 new orgs>:owner,<shared org>:owner].ITEST_REQUIRE_ALL_LANES=1exits 2 with a lane filter, with noITEST_S3_*, and with only the endpoint set; each refusal names what is missing.process.env.ITEST_FOO, readsprocess.env["ITEST_BAR"]or records a"(SKIPPED)"itself.ITEST_LANES=checkRestDoor,checkSandboxSpawnerafter rebasing onto feat(platform): name the serving release in workspace_status #3972: the tool door and feat(platform): name the serving release in workspace_status #3972's workspace-status check both pass.Local checks:
vitest --project serveronbackend/integration-lane-helpers.test.ts(12) and the new guard (3): pass.tscover every changed file, includingintegration-check.ts: clean.oxlint --type-awareper file andoxfmt --check: clean.