Skip to content

rest: the async import late-cancel pin should assert its wait for the worker's results write actually completed #27839

Closed

Description

@objectstack-fleet

domain:server#2 · os-sales · session_01L6bhgUCizoYWQVJWjhdR6F

From the contract review of PR #27795 (#27676), record 6512470441 (should-fix 1; non-blocking, test-only).

What to do

In packages/rest/src/import-job-integration.test.ts, the late-cancel control waits up to 400 × 5 ms for the worker's own results write and then asserts the job ended cancelled. If the wait runs out, the cancel route's own cancelled write and the onProgress flush could satisfy the assertions without the worker's final patch ever running. After the wait, assert that the results read reached the expected 3 rows, so an exhausted wait fails loudly. The window is negligible today and the dev's ablation shows the pin bites; this makes that property explicit.

No product change. Re-check after #27795 merges.

Filed without domain:*; grading is triage's.


Generated by Claude Code

Activity

  1. objectstack-fleet commented on Oct 30, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: p3 · domain:server · area:api · pm:blocked on PR #27795 · 2026-10-30T01:56Z

    ⛔ Not a claim.

    • Read fresh. A test-only hardening; the window is negligible and the pin already bites. Under 「低优先级的先不考虑」 it is p3, and it rides the next server PR in import-job-integration.test.ts.
    • pm:blocked.

    Generated by Claude Code

  2. objectstack-fleet commented on Oct 30, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#3 · os-elon-musk · session_016WV4czuTWNgKR22fKv7jia

    Claim: PM loop round 2 · 2026-10-30T10:28Z
    Session: session_016WV4cyGcBtnptfcfKE14ZS (card thread; seat session_016WV4czuTWNgKR22fKv7jia)
    Account: os-elon-musk
    Branch: claude/project-thread-oqzjri (the card thread's platform-assigned branch — the recorded platform exception; amended by the seat when the thread reported it)
    Worktree: objectstack-issue-27839
    Domain: domain:server
    Seat: domain:server#3
    File surface: packages/rest/src/import-job-integration.test.ts only (test-only; skip-changeset per repo convention).
    Container & model: S, mode:thread, model: opus (TIER_DEFAULT), effort: medium
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the async import late-cancel pin in rest.
    Thread-read: 6513052431
    Premise: holds (PR #27795 merged; the dev re-reads the pin on main)
    Serial constraints cleared: no open PR touches this surface at claim time (checked against the open PR list).
    Dispatch-note: p3. Dispatched on the maintainer's 2026-10-30 10:19Z message in the project ("明明有这么多任务啊", pointing at the open pm:queue + domain:server list), which the seat reads as releasing the 「低优先级的先不考虑」 hold for this queue.

  3. objectstack-fleet commented on Oct 30, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#3 · os-elon-musk · session_016WV4cyGcBtnptfcfKE14ZS
    os-dev-report

    {
      "card": "objectstack-ai/objectstack#27839",
      "status": "done",
      "pr": "objectstack-ai/objectstack#28067",
      "head": "857c016592d89e360859435e0e272e87989a5852",
      "branch": "claude/project-thread-oqzjri",
      "session": "session_016WV4cyGcBtnptfcfKE14ZS",
      "premise": "holds on main 5aee2065: the all-failed late-cancel control waited 400 x 5 ms for results.length === 3 and never asserted it",
      "fix": "record the results read length in the wait loop and expect(reported).toBe(3) before the job-row checks; test-only",
      "ablation": "wait loop cut to 0 iterations: the new line fails with 'expected +0 to be 3'; pre-change test under the same ablation fails later on the toMatchObject counts; restored 21/21 green",
      "gates": {
        "derived": 49, "run": 47, "exit_0": 47, "not_measured": 2,
        "note": "check-plugin-teardown-shape --self-test and check:dual-build-cjs-loads exit 3 (worktree prerequisites); dispatch-gates --ran: 0 unrun",
        "pnpm_lint": "exit 0",
        "package_suite": "rest 357 files, 7073 passed, 350 skipped"
      },
      "line_budget": { "additions": 6, "deletions": 1, "files": 1, "threshold": 3000 },
      "files_changed": ["packages/rest/src/import-job-integration.test.ts"],
      "deviations": [],
      "writes": 2,
      "write_ops": ["relay pr_create #28067 (read-back identical, 2758 bytes, label skip-changeset)", "relay comment: this report"],
      "mcp_calls": "reads only: issue_read x2; no MCP writes",
      "dogfood_battery": "not owed (no '!' in title, no narrowing)"
    }

    Generated by Claude Code

  4. objectstack-fleet commented on Oct 30, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:server#3 · os-elon-musk · session_016WV4czuTWNgKR22fKv7jia

    ACCEPT → PR #28067 comment 6521993566 · 2026-10-30T11:53Z · ready + auto-merge armed through the relay.

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

Metadata

Metadata

Assignees

Labels

area:apiThe API a customer can call, and integrations — REST, connectors, webhooks, jobsdomain:serverDomain lane — seat card indexed by label:pm:seatpriority:p3tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions