Repository navigation
Per-asset effect tables for tasks that cover a team asset (#1605) - #1684
Conversation
…asset (Tencent#1605) A task's covers names the team repo paths its work is expected to need. The results print one table per covered path an arm runs without exactly, split by the tasks that cover it with Newcombe 95% intervals, each skill trial's routing value from the task itself, and pass rates by whether the skill loaded. The dashboard's Compare tab shows the tables under the pair and links the skill to its routing scorer. - suite/plan validate covers like without, in first-covered order - plan refuses a covered path no arm receives, and two covered skills of the same name, which load records cannot tell apart - the record carries each trial's routing value per covered skill - assetEffects is pure over the record, so published records answer - wilson and pairedDifference move from history to table, their owner - docs en/zh: covers field, Asset effect section, not separated reading
The description includes sufficient real-CLI verification. I did not run, build, or install PR code. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
I built main (5a73276) and this head (0dfe07e) and ran teamai benchmark run on a temp team repo with a fake tool for which the skill matters. When a run gets that far, the numbers are right:
- On the covering task I recomputed the paired 95% interval by hand from the record (+7 to +100 pp); the other task reads
not separated. - The covering and other splits add up to the Compare page's pairs.
- A covered path that no arm receives is refused at
plan, with no run created. wilsonandpairedDifferencemove unchanged, so the regression gate and Compare give the same numbers as main.- The new record fields are optional, so published records still read.
[P1 blocking] Two tasks that cover the same skill are refused as ambiguous
coveredTaskRefusal (src/benchmark/start.ts) keys byName by bare name over every task's covers without removing duplicates. So tasks a and b, both with covers: [skills/auth-tokens], fail plan with task_covers_ambiguous: Tasks cover skills/auth-tokens and skills/auth-tokens, two skills of the same name auth-tokens…. #1605's example and the new docs example both have this shape. Compare the paths, not only the names: refuse only when two different paths share a bare name.
[P1 blocking] A covered namespace directory is read as a skill
skillNameOfCovered (in start.ts and result.ts) and bare (in table.ts) turn skills/<x> into skill x without checking that x is a skill. With covers: [skills/db] and skills/db/migrations/SKILL.md, the record holds routing {"db":"missed"} on trials whose used shows migrations loaded every time. The body says a namespace directory reads not observed. One helper that knows whether the path is a skill fixes this. Keeping it in one place also removes the four copies of that split, one of them in benchmarks-client.ts.
[P1 blocking] Only the first arm that leaves a path out gets a table
assetEffects (table.ts) picks one arm per path with arms.find(...). #1605's scope and the docs say there is a table for each covered path and each arm whose without is exactly that path. With the docs' "Cross tools with team assets" matrix over [claude, codex], the codex pair gets no table.
[P2 non-blocking] The docs example shows an interval the code cannot print
tasks that cover it +33 pp 3/6 -> 5/6 95% +4 to +89 pp (both languages). For 6 pairs going from 3 to 5 passes, even the most favorable pairing gives −17 to +67 pp, which prints not separated. The section opens with this example, so it teaches the wrong reading of a 6-trial split.
[P2 non-blocking] The zh-CN Compare panel is partly English
In assetPanel (benchmarks-client.ts), the column header line, yes / no, tasks that cover it and other tasks are raw strings without label() or locales.ts entries. The zh-CN page shows them in English under a translated heading.
[P2 non-blocking] Covered paths are checked against the member's selection, not each arm's
start.ts passes selectionOf(config) to coveredRefusal, while an arm with role receives that role's namespaces. A suite whose role arm receives skills/dev/x, run by a member who does not receive dev, would be refused. I read this in the code; I did not run it.
[P3 nit] Smaller items
- The
teamai:routing:…link shows even when the team has routing off. #1605 asks for it only when routing is on. - The
withoutarm recordsmissedoridlefor a skill it removed by design. The table reads only the arm that has the skill, so the output is right, but a reader of the published record seesmissedwhere the asset was absent.
The body's run is a real built-CLI run, but every trial passes in it, so it never shows a non-zero difference. A run where the skill matters would back the numbers.
@jeff-r2026 your call on this one once the three blocking items are fixed.
…ozen skill names, honest routing - One table per (covered path, each arm that runs without exactly it), each with its own has-arm match; a covered path no arm leaves out still shows rows (Tencent#1684 P1-3). - Skill names frozen at plan time: freezePlan takes coveredSkills, PlannedTask and the record carry coversSkills aligned with covers, and the record reads names from there instead of parsing paths — a namespace directory is never read as a skill (Tencent#1684 P1-2). - coveredTaskRefusal dedupes paths first: two tasks covering the same path are one cover, only two different paths of one bare name refuse as task_covers_ambiguous (Tencent#1684 P1-1). - coveredRefusal checks every selection the arms pull under, one checkout per selection with each path set aside on its own, so a role that receives a covered namespace no longer reads as refused (Tencent#1684 P2-3). - Trials of an arm that runs without a skill by design carry no routing for it: the asset is absent, not misrouted (Tencent#1684 P3-2). - The dashboard links a skill to its routing scorer only when the run carries a teamai:routing: scorer (Tencent#1684 P3-1), and the zh-CN panel labels its table header, yes/no and split lines (Tencent#1684 P2-2). - The docs example prints numbers the interval really backs: 1/6 -> 5/6 separates at +11 to +86 pp, 3/6 -> 5/6 does not (Tencent#1684 P2-1), and loaded-with cells list the missed and idle counts beside the loads.
|
Thank you for building both revisions and running the real CLI — the verification made every finding concrete. All of it is addressed in 510f14a, point by point. P1-1 — same-name ambiguity keyed by bare name over all tasks. P1-2 — namespace directory read as a skill by path parsing. One helper now decides it, P1-3 — only the first without-arm got a table. P2-1 — impossible example numbers. You were right: 3/6 → 5/6 is −17..+67, not separated. The example is now the run the code really prints: 1/6 → 5/6 separates at +11 to +86 pp, and the bullets read P2-2 — zh-CN panel partly English. The table header, P2-3 — coveredRefusal saw only the member's selection. It now takes every selection the arms pull under (the member's own plus one per distinct arm role), runs one P3-1 — routing link with routing off. The table carries a P3-2 — without-arm trials counted missed/idle by design. Trials of an arm whose own without-paths deliver a covered skill carry no routing for it at all — the asset is absent, not misrouted. The e2e tests assert the without-arm is routing-free. The verification run where the skill matters — same shape as before, but the tool only fixes when the clone delivers the skill: A non-zero, separated difference, from the real CLI. Lint, tsc, the unit suite (21,503 passed, the 5 known machine failures) and the 6 e2e tests are green; docs check passes. |
|
Findings
Earlier Findings Testing |
I re-reviewed at 510f14a with a build of the head and the first round's fixture. The three earlier blocking items are fixed:
The routing link, the zh-CN labels and the arm without the skill are fixed too. The request for changes stays open for these: [P1 blocking] Lint fails on this commit, so CI never ran tsc or the unit suiteAll six
[P1 blocking]
|
|
Findings
Resolved Testing |
…ers, print idle counts - coveredRefusal sets each path aside on its own, one after another within a clone, so no check reads a clone another path is moved out of: a delivered path no longer masks a path no arm receives (Tencent#1684 review). - A path an ancestor of another covered path covers is subsumed: the ancestor's check answers both, and moving each out in turn would take the nested path with it — the ENOENT is gone (Tencent#1684 review). - The dashboard's loaded-with cell lists the missed and idle counts beside the loads, as the CLI's does; the docs example carries them, and passed-when-not-loaded reads 2/3 as the example's own rows give it.
|
Round 2 addressed in 74ac8dc + 94228a1 — thank you again; the parallel-check catch and the ENOENT you found in your own first pass are exactly the kind only a real run shows. P1 — lint. The 4 warnings are gone (shadowed P1 — a delivered path masking a path no arm receives. P1 — namespace + nested skill ENOENT. A path an ancestor cover subsumes is skipped: P2 — the docs' lead example. All three lines now match what the code prints:
The PR body now carries the corrected example and the skill-matters run from the comment above ( Lint 0/0, tsc clean, the touched unit suites and the 6 e2e tests green, docs check passes. |
|
Findings
Resolved Testing |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
I re-reviewed at 94228a1 (74ac8dc plus 94228a1) with a build of the head. The three blocking items from the last round are fixed:
- Lint and type check pass on all six
Lint & Testjobs (run 41637094313). - A task covering
[skills/dev/deploy, skills/ops/runbook]for adevmember is now refused, 3 runs out of 3. - Covering
skills/devin one task andskills/dev/authin another plans and prints both tables, with no ENOENT.
The "passed when not loaded 2/3" line and the zh-CN table are fixed too. These still need a change before this is ready:
[P2 non-blocking] A covered path is checked in a clone that earlier checks emptied, so plan depends on which task file holds a cover
firstUnchanged (team-without.ts:173-212) moves a path that passes its check into held, and finally deletes held; the path never goes back into the clone. Since each covered path is now checked in turn in the same clone, every later path is checked with the earlier delivered paths missing. Member with role dev, team with rules/review.md and rules/dev/review.md, arms pulled and without: [skills/dev/deploy]:
- one task covers
[rules/review.md]: refused, "its namespace dev delivers rules/dev/review.md in its place; list rules/dev/review.md too"; - one task covers
[rules/review.md, rules/dev/review.md]: accepted; - task a covers
rules/review.md, task b coversrules/dev/review.md: refused with the same advice, although task b already lists it.
claudemd/team.md with claudemd/dev/team.md behaves the same. Putting a passed path back into the clone after its check, so each check starts from the full tree, fixes it. The CI review raised this one; its skill example is caught earlier by the same-name check, but the rule and claudemd pairs above reproduce it.
[P2 non-blocking] A covered path is skipped when a parent path is also covered, so plan accepts a nested path no arm receives
team-without.ts:133 drops a covered path whose parent is covered. Role dev, the member excludes the skill auth, arms pulled and without: [skills/dev/deploy]:
- a task covering
[skills/dev/auth]is refused, as it should be; - add a task covering
skills/dev, andplanaccepts and the run starts.
That breaks the rule the docs state: plan refuses a covered path no arm receives. Once the first item is fixed, the skip can go: setting skills/dev/auth aside on its own never moves skills/dev, and the ENOENT came only from moving the parent out without putting it back.
[P2 non-blocking] The loading counts in the docs are still not what the code prints
formatLoads (table.ts:258-267) and the dashboard's loads (benchmarks-client.ts:312) skip missed and idle whenever anything loaded. On the docs' own rows, both print 2/3 fit and 1/3 extra, while the docs (en and zh-CN), the JSDoc and the PR body show 2/3 fit, 1 missed and 1/3 extra, 2 idle, and the "Read it as" bullet refers to the missed count. Either print every non-zero count in both places, or change the docs, the JSDoc and the body to match.
[P3 nit] The CLI and the dashboard order the unloaded counts differently
With nothing loaded, the CLI prints 0/3 2 idle, 1 missed and the dashboard 0/3 1 missed, 2 idle. Sharing one order goes away with the item above.
The PR body's run names no build commit, and its Tests section still says coveredRefusal: 8 (there are 10 now). My run at 94228a1, which can go in the body:
Build: 94228a14 (npm ci && npm run build). Temp bare team and app repos, isolated HOME, empty global git config,
fake claude that fixes the task only when its clone delivers the skill; teamai init/pull, then:
$ teamai benchmark run fix --sandbox # 2 tasks (fix covers skills/auth-tokens + rules/auth.md), arms pulled / no-tokens / no-both, 2 reps
exit 0
Asset effect · skills/auth-tokens · no-tokens -> pulled · claude
fix yes 0% (0/2) 100% (2/2) 2/2 fit
tasks that cover it +100 pp 0/2 -> 2/2 95% +7 to +100 pp
# Task a covers skills/dev, task b covers skills/dev/auth, arm without skills/dev/auth
exit 0
Asset effect · skills/dev/auth · no-auth -> pulled · claude
b yes 0% (0/1) 100% (1/1) 1/1 fit
# Role dev; one task covers skills/dev/deploy (delivered) and skills/ops/runbook (not delivered), 3 runs
exit 1 arm_team_unresolved: A task covers skills/ops/runbook, which is in namespace ops, and the arm's roles or projects don't receive ops, so leaving it out changes nothing.
@jeff-r2026 your call once these are fixed.
|
The one red job on 94228a1 — On this PR it passed in the other five matrix cells, and the full suite passed on my machine on the same head. I can't rerun the job from a fork — whoever has rights, a re-run should clear it. |
Agreed: run 41519501356 on main failed in the same |
firstUnchanged now puts every path it set aside back into the checkout, so each covered path is checked in a full tree and the result no longer depends on which task file lists a cover. With each check independent, a covered path inside another covered path is checked on its own again, so plan refuses a nested skill no arm receives.
…on Compare The CLI and the dashboard print the loaded value first and then every other non-zero routing count, in ROUTING_VALUES order, which the dashboard now reads from the same definition. The table carries each covered skill's routing question name, built by routingScorerName, so the dashboard link no longer splits the path. Compare shows the asset tables when the suite has no comparable pair.
…rm leaves out An arm that runs without a directory holding a covered skill, such as without: [skills/dev] for skills/dev/auth, now treats that skill as absent, as it does for an arm without exactly that path.
The test hands the run over three times and runs about 330 git processes. On macOS CI runners that took 6 to 16.5 s against the 15 s default, so the slowest jobs timed out (Node 20 on macOS, on main and on a pull request). It never hangs: with a longer limit it passes, and no single wait dominates its time. Other git-heavy tests already carry their own 60 s limit.
…tead A cover is checked on its own, so listing the namespace copy as well never made a shadowed shared path acceptable. The refusal now says to cover the copy instead; an arm's refusal keeps 'list it too'.
To get this landed, I pushed five commits on top of 94228a1 that close the open items from my last comment, plus the macOS flake:
Each new test fails before its fix. Locally: typecheck and lint pass; 16 unit files that reach the changed code pass (367 tests), and 17 e2e files (this PR's, every one that drives Left out: checking covers against what a role arm installs ( I will approve and squash-merge once CI is green on 3c165e1. Thanks for the feature and the quick rounds. |
|
Findings
Resolved Testing |
…ting on a team-free arm A row with observed and unreported loads printed only the observed ones (1/2 fit for fit + unknown); it now counts the unknown trials too, and prints unknown alone only when no tool reported. An arm with team: none recorded routing for covered skills it never received; it is absent, as on a without arm.
On the CI review at 3c165e1:
Typecheck and lint pass. Waiting for CI on 12d2ff5, then I approve and merge. |
|
Findings
Resolved Testing |
On the CI review at 12d2ff5: the unknown counts and the team-free arm are confirmed fixed. The role-specific absence it adds (an |
|
Findings
Resolved Testing |
…rms install A run whose every arm runs with a role no longer checks covers against the member's own selection, so a path none of those roles receives is refused, as a path no arm receives already was. The selections are built next to the covers check, with the arms that install under each.
…blation leaves it out Plan now records, per covered path, the arms whose selection pull does not deliver it to (coversWithheldFrom), and a trial on such an arm records no routing for that skill. An arm that runs without a skill's SKILL.md also counts the skill absent; leaving out another file in the skill keeps its routing. Plans without the new field read as before.
I pushed two commits on top of f51450c for the CI review's open items:
Each has a unit case that failed before it ( The One gap is left on purpose: a role arm's selection is still the member's with the role swapped, so the member's excludes and tags apply to it, while a role clone installs with the role's own selection. That affects only a member who excludes a skill a role arm covers, and the |
|
Findings
Resolved Testing |
An arm that runs with team: none pulls nothing, so it no longer brings the member's selection into the covers check. A path only the member receives is refused when the only arm without a role is team-free.
On the CI review at f8bd297:
|
|
Findings
Resolved Testing |
With each arm on team: none, no selection is read, so the covers check had nothing to refuse with and accepted the paths. It now refuses them up front.
On the CI review at c1da522:
|
|
Findings
Resolved Testing |
On the CI review at 2bb3d2b: the ablated-arm, named-ref and timeout points are answered in my last comment. The new one, a rows-only table that picks a pulled arm whose role does not receive the path as "with", has the same cause: which arms receive a covered path is known at plan time ( |
# Conflicts: # src/__tests__/workflow-handoff.test.ts
|
Findings
Resolved Testing |
… and without paths The covers check now reads each arm as its clone installs: at its team revision, with its role as the clone's step role (no member tags or excluded skills), and without the paths it runs without. Arms that share those share one read. A path no arm receives is refused, and the arms that do not receive it are recorded as withheld. The without check reads a role arm with the same selection.
The record's tasks now carry, by covered path, the arms plan found it withheld from (optional, so older records still read). When no arm leaves the path out, the asset-effect table shows the first pulled arm that receives it rather than the first pulled arm.
I pushed two commits that close the per-arm points at their shared cause: the covers check now reads what each arm's clone actually receives.
Each gap has a unit case that failed before its fix; the benchmark unit files pass (375 tests), lint and typecheck are clean, and the e2e files The new refusal keeps the |
|
Findings
Resolved Testing |
…d arm receives it A rows-only table falls back to the first arm on another team ref that receives the path, so the table no longer disappears when that is the only arm that gets it.
On the CI review at 8354546:
|
|
Findings
Resolved Testing |
…s that receives it A rows-only table falls back to the first arm with team assets that receives the path, also one that runs without another path, when no pulled arm receives it.
On the CI review at 80ab891:
|
|
Findings
Resolved Testing |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Approving at 3b6fe14. Every finding from our reviews and the CI reviews is either fixed in this branch, with a unit case that failed before it and the real-CLI records in the comments above, or answered there: unrun trials follow the convention every compare table uses, and the workflow-handoff-sessions-and-offers timeout fixes a test that times out on main too. All 18 checks pass at this head; the one macOS shard that failed first timed out in files this PR does not touch and passed on a rerun.
Closes #1605. Builds on #1658's benchmark engine and #1650's record
usedfields, both on main.What
A task's
coversnames the team repo paths its work is expected to need, and the results answer, per covered path, whether an arm that runswithoutexactly that path passes less on the tasks that cover it — and no less on the others.loaded withcarries [feat] Judge whether team skills load when they should, without writing a scorer #1469's routing values, decided by the task instead of a judge:fit,missed,extra,idle,unknownwhen the tool reports no skill loads — those still count in the pass rates, in neither when-loaded bucket. Only skills have the column: a rule, aclaudemd/file, a doc or a namespace directory readsnot observed.planrefuses a covered path no arm receives, and two covered skill paths of the same bare name, which a trial's load record cannot tell apart (task_covers_ambiguous). Each covered path is checked on its own against the full team tree, so the answer does not depend on which task file lists it or on a covered parent directory. A shared path a namespace copy stands in for is refused with "cover instead".assetEffectsis pure over the record, so published records answer without a rerun.wilsonandpairedDifferencemove from history to table, their owner; history re-imports.loaded withprints the loaded value first, then every other non-zero count in one order, in the CLI and on the dashboard.1/2 fit, 1 unknown).teamai:routing:...counts (the name comes from the record); assets come from the newest run's own table. Every label has a zh-CN translation.coverstask field and an Asset effect section led by the reading of each line,not separatedincluded.Verification record
Real CLI on this machine (
npm run build, thenteamai pull+teamai benchmark run fixon a temp team repo), fake claude that fixes only when its clone delivers the skill and then loads it; 3 arms (pulled, without the skill, without both), 2 tasks (one covers both paths), 2 repetitions:The tool here only fixes when the clone delivers the skill, so the difference is non-zero and separated:
0/4against4/4,+7 to +100 pp— the skill matters, and the tables show it. The rules table has no without-arm, so it shows rows and loads only; the two-path arm gets no table; the unloaded covering task would readmissed, a tool that reports no loads0/1 unknown, both covered by tests.Record at 3c165e1 and ea00ccce
The rules cases ran at 3c165e1. The namespace cases and the tables ran at ea00ccce; 3c165e1 changes only the covers refusal message after it.
Tests
src/__tests__/benchmark-asset-effects.test.ts— every routing count in one order, and: table selection, split differences, routing counts, non-skillnot observed, multi-path arm rows-only, no-without-arm rows-only, unknown loads, has-arm matching by tool, no covers no tables.src/__tests__/benchmark-team-without.test.ts—coveredRefusal: refusals and acceptances of the covers themselves, including the same answer in any cover order, a skill inside a covered namespace directory, and covering the namespace copy instead.src/__tests__/e2e/benchmark-asset-effect.test.ts— real CLI on the local driver, issue criteria 1–7, and no routing for a skill inside a namespace an arm leaves out.src/__tests__/dashboard-benchmarks-view.test.ts— the Compare tab's asset tables, also with no comparable pair, and their zh-CN labels.src/__tests__/workflow-handoff-sessions-and-offers.test.ts— the back-and-forth handoff test gets 60 s: it timed out at 15 s on macOS Node 20, on main (run 41519501356) and here, from the cost of its 328 git processes, not a hang.npx tsc --noEmit,npx oxlintandnode scripts/check-docs.mjsclean.