Skip to content

ci(test-shards): the weekly shard-timings refresh is refused by the partitioner's own self-test — @objectstack/cli (1432 s) can be neither kept whole nor sliced under the density bound #29777

Closed

Description

@objectstack-fleet

domain:devx#2 · marchtian · session_017ihL2gLghEqeDKTbDTC7Zd

Filing gate: ① a measured red on a generated PR the domain:devx lane owns (the weekly refresh, #22949 ruling E). Found while answering triage's stale-PR sweep on PR #28978.
Reader: domain:devx (scripts/partition-test-shards.mjs, its slice spread check in the self-test).
Dedupe (open AND closed): slice spread, partition-test-shards cli whole slice, shard-timings. #25870 (open) is about the two slowest shards' wall clock, not this refusal. #25936 is about the refresh PR's token. No card for this refusal.
reach: every weekly refresh until the partitioner or the dataset changes. The next scheduled run is Monday 05:30Z (shard-timings-refresh.yml, cron: '30 5 * * 1').
type: Bug

What happens

The 2026-11-02 refresh (run 41394864471) opened PR #28978 (head b5b4b790, one file, +261/−405). On that head, Lint · CI, release & engine gates is red on one gate, Shard partitioner self-test (node scripts/partition-test-shards.mjs --self-test):

Error: slice spread: the committed dataset, split as CI splits it, carries no slice -- @objectstack/cli: whole (whole 1432s against 736s, 1.3x the heaviest other serial task, but sliced the densest shard would carry 1552.63s, past the 1455.81s densit…
    at partition-test-shards.mjs:2125

The refreshed timings put @objectstack/cli at 1432 s. The check wants the dataset to carry at least one slice. Slicing cli would push the densest shard past the density bound, and keeping it whole leaves no slice, so the check refuses either way. Lint & Repo Gates is red only because it aggregates that lane.

Wanted

  • Decide which side is wrong. Either the check's "carries a slice" expectation no longer fits the measured workload, or the density bound or shard count needs to move for a 1432 s serial task. Measure it on the refreshed dataset rather than the committed one.
  • ⛔ Do not delete or weaken the check to make the refresh land. Do not hand-edit the generated timings.
  • When this lands, re-run the refresh or let Monday's run regenerate it. PR chore(ci): refresh the Test Core shard-timings dataset #28978 is parked on this card.

Activity

  1. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-zhuang · session_01AavokzJ5DndAwitDXvKy4U

    Path: none

    Triage: first-touch audit · p2 · domain:devx kept · pm:queue · 2026-11-03T04:53Z

    ⛔ Not a claim.

    • Read fresh. Measured: the weekly shard-timings refresh (PR chore(ci): refresh the Test Core shard-timings dataset #28978) is refused by the partitioner's own self-test, because @objectstack/cli at 1432 s can be neither kept whole nor sliced under the density bound. Every weekly refresh stays red until the partitioner or the bound changes, and the next run is Monday 05:30Z. CI tooling, p2.

    Generated by Claude Code

  2. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:devx#2 · marchtian · session_017ihL2gLghEqeDKTbDTC7Zd

    Claim: PM loop round 3
    Session: session_017ihL2gLghEqeDKTbDTC7Zd
    Account: marchtian
    Branch: claude/issue-29777-partitioner-slice-spread
    Worktree: objectstack-issue-29777
    Domain: domain:devx
    Seat: domain:devx#2
    File surface: scripts/partition-test-shards.mjs and its self-test; the shard count or density-bound declaration it reads, if that is where the fix lands; ⛔ not the generated timings dataset
    Container & model: M, mode:subagent, model: default tier, effort: high
    Clause-②: no
    Metadata-protocol: none
    Responsibility: the weekly shard-timings refresh is refused by the partitioner's own slice spread self-test, so it can never land
    Thread-read: 6595787705
    Premise: holds (PR #28978 head b5b4b790 red on Shard partitioner self-test only)
    Serial constraints cleared: PR #28978 is parked on this card (6595319265); no other open PR touches scripts/partition-test-shards.mjs at claim time (the dev re-checks)

  3. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:devx#2 · marchtian · session_017ihL2gLghEqeDKTbDTC7Zd

    席位读数 — HOLD, a bound ruling owed · domain:devx#2 · base 97c2982c00 · 2026-11-03T05:40Z

    The dev reproduced PR #28978's red byte for byte (partition-test-shards --self-test on head b5b4b790's dataset: exit 1, slice spread), and stopped at the order's design-choice clause. No PR was opened and nothing was pushed. The seat's reading of the measurements:

    1. Pin 3b is right. On the refreshed dataset the full list would run @objectstack/cli whole: a 1432 s serial task plus the 270 s declaration closure, against about 500-570 s on the other seven shards.
    2. The refusal is structural. The CLI shrank (2697.45 to 1432.04 s; no file dominates it, the slowest is 21.67 s). It now sits below the 8-shard mean, so the whole split is balanced and the density cap equals the mean (1455.81 s). The declaration-closure charge (ci(test-core): build declarations on one CLI slice only — pin the CLI's declaration readers into slice 1/n #27018) then moves about 783 s onto the other seven shards, to about 1552.6 s at x2, x3 and x4 alike. On a balanced whole split the charge and the cap cannot both hold. On the committed dataset the cap (2697.45 s) has never bound.
    3. A second red sits behind it. Pin 3c derives x2 on the refreshed dataset (716 s against 736.45 s, a 20 s margin), while the committed dataset refuses x2. So the slice-count map and the dataset can only land together.

    Options measured for which bound yields (prototypes in a scratch tree only):

    The dev recommends B, landed first (it is inert on today's dataset), followed by one lane PR that carries the generated dataset byte for byte with the map 4→2 (the #26186 shape), which replaces #28978. This changes what a bound means, so the seat sends it to the maintainer instead of ruling. #28978 stays parked, and this card waits on that ruling.

  4. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:devx#2 · marchtian · session_017ihL2gLghEqeDKTbDTC7Zd

    Maintainer ruling recorded · domain:devx#2 · 2026-11-03T06:22Z

    The maintainer, on the project's decision card, question 「分片密度上限和声明闭包计费,放宽哪一个?」, picked option 「B:上限加闭包分摊(推荐)」 (a platform-recorded pick, so the option label is the maintainer's word). This answers the seat's HOLD 6596381272.

    What the seat executes:

    1. B lands first. In planShards, when the WITHIN-CAP check reads a candidate split that carries the declaration reader slice, the cap gains DECLARATION_CLOSURE_CHARGE_SECONDS / (shardCount − 1). The self-test's hard constraint that the committed dataset's full list stays within the cap is scored against that same adjusted cap. The pin "cap = the whole split's densest shard" and the capFixture positive control stay as they are. On today's committed dataset the output must stay byte-identical; the bins read 1600.11/1597.48/… as now.
    2. Then one lane PR carries the refreshed dataset byte for byte, with FILE_SHARDED_PACKAGES cli 4→2 and PREVIOUS_FILE_SHARDED_PACKAGES = 4 (the ci(test-shards): refresh the Test Core dataset and cut the CLI into 4 slices on plain-sum placement, and pin the whole-package leg #26186 shape). It replaces chore(ci): refresh the Test Core shard-timings dataset #28978, which then closes. ci.yml's DTS_READER_SLICE and the cli vitest config's DECLARATION_READER_SLICE do not change.

    Measured on the refreshed dataset at 8 shards: the B cap is 1567.67 s against a densest x2 shard of 1553.36 s, a 14 s margin. Pin 3c's lack of hysteresis (x2 holds by only 20 s) is outside this ruling and goes to its own finding.

  5. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:devx#2 · marchtian · session_017ihL2gLghEqeDKTbDTC7Zd
    os-dev-report

    Round 2: slice 1 of ruling record 6596963071 (option B). Draft PR #29838, head e9569e920e. Measured on objectstack-ai/objectstack, merge base b0ef25f524.

    {
      "issue": 29777,
      "status": "done",
      "branch": "claude/issue-29777-partitioner-slice-spread",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/29838",
      "head_sha": "e9569e920e",
      "session": "session_017ihL2gLghEqeDKTbDTC7Zd",
      "premise_still_valid": true,
      "summary": "planShards() judges, and repairs, a candidate split that carries the declaration-reader slice against densityCap + DECLARATION_CLOSURE_CHARGE_SECONDS / (shardCount - 1) (new closureAllowance(); 111.86 s at 8 shards); a split without it keeps the bare cap. The self-test hard constraint is scored against the same adjusted cap; the cap-definition pin and the capFixture controls are unchanged. 4 new pins on the refresh's frozen weights (79 packages from b5b4b790, inside the test): x2 taken within 1567.67 s (densest 1553.36 s), not carried allows 0 s, a cap short of the adjusted one still refuses by name. Today's committed dataset splits byte-identically.",
      "tests": [
        "partition-test-shards --self-test, committed dataset at e9569e920e: exit 0; verdict line byte-identical to base",
        "byte-identity base b0ef25f524 vs head: main() --shard 1/8..8/8 --exclude @objectstack/dogfood on a full-list document, stdout and stderr byte-identical on all 8; plan JSON items, bins 1600.11/1597.48/1597.14/1599.09/1598.01/1597.78/1599.48/1597.04 and cap 2697.45 identical; the one difference is the added decision key allowance 111.85714285714286",
        "PR 28978 dataset (b5b4b790), scratch tree: base red on 7 checks (first: slice spread), head red on 1 (pin 3c 'Lower it to 3', the map swap slice 2 carries); with slice 2's map applied in scratch (cli 2, previous 4): exit 0, CLI x2, bins max 1553.36 within 1455.81 + 111.86 allowance, whole legs within 1868",
        "ablation, scratch tree: closureAllowance mutated to return 0 (marker grep-confirmed): exit 1; collected, the 3 allowance-dependent cases red, the not-carried case green; restored by byte comparison, restored exit 0",
        "importer self-tests exit 0: nightly-tiers, check-test-suite-ceilings, measure-test-shard-timings, ci/select-shard-timings-run, ci-shard-matrix, check-test-completeness"
      ],
      "gates": "dispatch-gates --commands at e9569e920e: 31 commands, all run with exit codes captured before any pipe after pnpm install --frozen-lockfile, all 31 exit 0 (pnpm check:pm-dispatch-gates fast tier 1945 cases, exit 0). --ran: 31 derived, 31 run, 0 NOT-MEASURED, a DERIVED zero (every line carries its exit code). First pass before install: 6 exit 3 PREREQUISITE NOT MET (yaml missing) + 1 environment finding (@changesets/cli missing), all green after install. NOT MEASURED locally, CI's: the Plan Test Core shards step and the type-check lanes. PR check-runs at report time: 10 completed, 0 failed, 15 in_progress.",
      "dogfood_battery": "n/a: no ! in the title and no (narrowing) arm",
      "line_budget": "+168 / -15, 1 file; under the 3000 human-merge threshold",
      "deviations": [
        "Round 1 removed a scratch worktree with --force; it held only my own intentional ablation mutation. This round's scratch tree is the same case, removed after its last read.",
        "Byte-identity holds for the split and every shard's output; the slice-decision record gains one key (allowance), named above.",
        "The self-test success line was changed so it names the allowance when bins exceed the bare cap; its text today is byte-identical, and without the change it would read false once slice 2 lands.",
        "PR body ends with the line the order specified; the session URL sits in the body prose."
      ],
      "files_changed": ["scripts/partition-test-shards.mjs"],
      "claims": "Claim 6596162760 (this branch, this session); no second claim; card assignee untouched; PR has no assignees and no reviewers.",
      "measurements": "Round 1's per-candidate table stands. Under B at 8 shards on the refreshed dataset: cap 1455.81, allowance 111.86, judged 1567.67; x2 densest 1553.36 (14.31 s margin). Committed dataset unchanged: cap 2697.45, bins as above.",
      "mcp_calls": "0",
      "api_writes": "2: pr_create via the relay (run 41592767706, POST pulls plus the skip-changeset label leg; read-back 7224 bytes sent and stored, identical) and this comment via post-stamped.mjs. git push x2 of the own branch (not REST).",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "class: reading, the ruling files it separately · pin 3c has no hysteresis: refreshed x2 holds by 20 s (716 vs 736.45); carrier: domain:devx seat",
        "class: reading (not filed) · the committed layout re-weighed with the refreshed weights carries 2161 s of whole packages on one shard, past the 1868 s whole-leg cap; carrier: domain:devx seat"
      ]
    }

    Generated by Claude Code

  6. objectstack-fleet commented on Nov 3, 2026

    @objectstack-fleet
    ContributorAuthor

    domain:devx#2 · marchtian · session_017ihL2gLghEqeDKTbDTC7Zd

    Landed, both slices · domain:devx#2 · 2026-11-03T08:28Z

    The seat releases the card: pm:dispatched comes off, and the worktree is removed.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions