fix: prevent permanent owned-link target mismatch on task launch (#2253)

This commit is contained in:
Carlos Florêncio
2026-08-05 10:54:59 +01:00
committed by GitHub
parent a2db334adc
commit c6dffa122a
39 changed files with 1751 additions and 157 deletions
+4 -1
View File
@@ -157,7 +157,10 @@ path. Always inspect `error-context.md`; mobile/terminal flakes often show
state that the stack trace alone hides, such as duplicate active terminals or a
terminal stuck on "Starting terminal...".
When a PR-specific E2E shard fails, first identify the failed spec(s). If failures are in unrelated existing specs and no changed code plausibly affects that surface, record the failure as unrelated in the PR fixup summary instead of changing unrelated tests.
When a PR E2E shard fails, investigate every spec, including those outside the
diff; never dismiss, rerun, or merely record a failure as unrelated. Reproduce
the exact test, then preserve shard ordering and CI pressure. Fix every valid
defect with retries disabled, or evidence a concrete external blocker.
**CRITICAL: E2E tests run against the production Vite build served by the Go backend**, not dev mode. After any frontend code change, you **must** rebuild before running tests (`pnpm e2e:run` does this for you):
@@ -167,10 +167,11 @@ go test -race ./path/to/package -run '^TestName$' -count=20
go test -race ./path/to/package -count=3
```
If a failed-job rerun reports a different, unrelated package or test, validate
that second failure the same way and allow one additional failed-job rerun
instead of changing unrelated PR code. Stop and fix code when the same failure
reproduces locally or repeats in CI.
If a failed-job rerun reports a different package or test, validate that failure
with the same rigor even when it is outside the PR diff. Do not dismiss or rerun
past a valid race, leak, or product defect because it appears unrelated; fix it
and exercise the affected package without retry masking. Only an evidenced
external dependency or infrastructure fault is exempt from code remediation.
## E2E Failures
@@ -191,14 +192,12 @@ scripts/run-quiet e2e -- bash -c 'cd apps && pnpm --filter @kandev/web e2e -- te
scripts/run-quiet e2e -- bash -c 'cd apps && pnpm --filter @kandev/web e2e -- tests/path/to/failing.spec.ts -g "exact failing test title"'
```
If the failed E2E spec is unrelated to the PR diff, the exact failing test
passes locally via `pnpm e2e:run`, and there are no unresolved review threads
or other failed checks, rerun the failed GitHub job once and poll until terminal:
```bash
gh run rerun <run-id> --failed
scripts/pr-state --summary <PR>
```
An isolated pass does not invalidate a CI failure, and a spec outside the PR
diff remains part of fixup scope. Re-run it with retries disabled under CI
resource limits and preserve the failed shard's ordering. If that exposes a
race, stale state, or interaction leak, fix it and stress the smallest
reproducing sequence before running the full affected shard. Never use a
failed-job rerun as a substitute for explaining and fixing a valid test failure.
When a UI copy rename is intentional, search E2E specs for old visible text
before debugging deeper. Prefer updating assertions to the new label while