Skip to content

fork tests live in fork-owned test files, not appended to upstream ones [📡#397] #439

Closed as duplicate

Description

@donjor-agent

🤖 claude/anthropic claude-fable-5-1 (high)

Idea

The first churn-ledger signal is not source, it is tests. Fork commits append describe blocks inside upstream-owned test files, and every time upstream appends a test at the same seam the rebase conflicts.

Evidence (docs/internals/fork-churn.md after slices 1, 3, 4):

  • packages/contracts/src/settings.test.ts: eight fork commits touch it; slice 4 conflicted twice there (feat(files): reveal ignored workspace files (#73), feat(web): add GitHub link destination controls (#178)), both against upstream's new browser-recording tests at the same insertion point. rerere had already seen the seam in the pre-ladder walk.
  • apps/web/src/components/ChatView.logic.test.ts: conflicted in two walks for one fork fix.
  • Other upstream test files with repeated fork touches: apps/web/src/components/Sidebar.logic.test.ts (10), apps/server/src/server.test.ts (7), apps/web/src/projectRoutes.test.ts (5).

Every one of these is mechanical, and every one is avoidable.

Shape

Move fork-authored test blocks out of upstream-owned test files into sibling fork-owned files (<name>.fork.test.ts, or the repo's chosen suffix), one file per upstream file, keeping the same imports and runner. A fork-only test file is add-only on rebase and never conflicts. Fork changes to an upstream test's existing expectations stay where they are; only appended fork blocks move.

Record the convention in docs/internals/fork-development.md so new fork tests land in fork-owned files from the start, and make fork:scan (or the rebase feasibility walk) flag a fork commit that appends to an upstream test file.

Done when

  • The listed files carry no appended fork describe blocks; the moved tests pass unchanged.
  • The convention is documented and the scan flags a new violation.
  • The next walk's churn row shows no conflict in an upstream test file.

Origin: churn ledger under RSI-Software/t3code-hyprws#396, first read after slice 4 of RSI-Software/t3code-hyprws#397.

Relationships: parent #397; relates to #396.
Priority position: after #401.

Activity

  1. donjor commented on Sep 2, 2026

    @donjor

    Header

    • from: origin/refactor/fork-owned-test-files-rebased@04e0e68d4ba7b8269006f103df961fa76227143d
    • Target: v0.0.38-nightly.20260831.1236@9b2d04317c68233782e0630464ac86d77d0686f3
    • expected_old: 564cdefdff4ffaea27474f4256ea9e2c4f9eeb6b
    • Rehearsal branch: rehearse/rewrite-04e0e68d4ba7-from-564cdefdff4f
    • Rebased head: 04e0e68d4ba7b8269006f103df961fa76227143d
    • Stack size: 206 fork commits

    Rewrite proofs

    Proof Expected Actual Pass
    bot paused candidate/off and not RUNNING candidate/completed pass
    same base 9b2d043 9b2d043 (origin 9b2d043) pass
    commit count 205 or 206 206 pass
    message digest (first N) 0f45720879ec 0f45720879ec pass
    non-test diff empty after excluding docs/internals/fork-development.md,docs/internals/fork-delta.md empty pass
    • from: origin/refactor/fork-owned-test-files-rebased
    • origin: 564cdefdff4ffaea27474f4256ea9e2c4f9eeb6b
    • base: 9b2d04317c68233782e0630464ac86d77d0686f3

    Silent seams

    None.

    Verification

    • vp run --no-cache fork:scan: passed
    • vp run --no-cache fork:delta --check: passed
    • hyprws CI https://github.com/RSI-Software/t3code-hyprws/actions/runs/33647189889: passed

    Grounding

    None.

    land

  2. donjor commented on Sep 2, 2026

    @donjor

    Installed the rehearsed rewrite of the fork series on v0.0.38-nightly.20260831.1236; the leased rewrite replaced 564cdefdff4ffaea27474f4256ea9e2c4f9eeb6b. Rehearsal record: #439 (comment)

  3. donjor-agent commented on Sep 2, 2026

    @donjor-agent
    Author

    🤖 claude/anthropic claude-fable-5-1 (high)

    The relocation landed for the three files the evidence section called out. Keeping this open: the "Done when" list is not met yet.

    Landed

    hyprws is now 04e0e68d4ba7b8269006f103df961fa76227143d, 206 fork commits on the same base tag v0.0.38-nightly.20260831.1236. The rewrite went in through the rewrite lane under lease 564cdefdff4ffaea27474f4256ea9e2c4f9eeb6b; the rehearsal record is in the comment above.

    Fork blocks now live in fork-owned siblings:

    • packages/contracts/src/settings.test.ts -> packages/contracts/src/settings.fork.test.ts
    • apps/web/src/components/ChatView.logic.test.ts -> apps/web/src/components/ChatView.logic.fork.test.ts
    • apps/web/src/components/Sidebar.logic.test.ts -> apps/web/src/components/Sidebar.logic.fork.test.ts

    All six files pass: vp test run reports 445 tests passed, vp check reports no warnings or lint errors, vpr typecheck is clean, and hyprws CI is green on the applied head.

    The convention is recorded in docs/internals/fork-development.md, and docs/internals/fork-delta.md gained a fork-meta rebase-scan row for the three upstream-owned originals.

    Remaining

    1. Two files from the evidence list still carry fork touches and were not moved: apps/server/src/server.test.ts (7 fork commits) and apps/web/src/projectRoutes.test.ts (5). Whether each touch is an appended fork block or an edit to an existing upstream expectation still needs the per-commit read this issue asks for.
    2. fork:scan does not yet flag a fork commit that appends to an upstream-owned test file, so nothing enforces the convention. That rule is adjacent to the new scan rules tracked in guard-seam [Strategy] every ledger action, its guard, no recurrence [📡#443] #445.
    3. The third criterion, a churn row with no conflict in an upstream test file, is only observable on the next walk.

    Note from the apply

    The first gate-3 attempt failed hyprws CI at vp check, and the cause was not fork code:

    Vite+ panicked. This is a bug in Vite+, not your code.
    thread '<unnamed>' (3505) panicked at library/std/src/io/stdio.rs:1166:9:
    failed printing to stdout: Resource temporarily unavailable (os error 11)
    

    The split had left 119 dead named imports across the six files, which is what made the warning stream large enough to trip it. Removing them fixed the volume and the job, but the underlying flake will return whenever the warning stream grows again.

  4. 96 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dxdeveloper experience, CLIs, skills

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions