@fish-under-sea/dsh-agent-teams-fish 1.0.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.md +13 -7
- package/README.en.md +20 -12
- package/README.md +20 -12
- package/compatibility.json +82 -46
- package/icon.png +0 -0
- package/lib/artifacts.js +148 -25
- package/lib/client/ActivityPanel.js +26 -5
- package/lib/client/WorkspaceActivity.js +6 -4
- package/lib/client/activity-monitor.js +113 -41
- package/lib/client/locales.js +14 -0
- package/lib/client.js +433 -199
- package/lib/client.js.map +1 -1
- package/lib/command.js +7 -4
- package/lib/git-artifact-stamp.json +2 -2
- package/lib/harness-compat.js +120 -62
- package/lib/index.js +7 -10
- package/lib/mailbox.js +15 -5
- package/lib/members.js +221 -154
- package/lib/snapshot.js +15 -10
- package/lib/state.js +41 -8
- package/lib/tools.js +123 -64
- package/lib/types/artifacts.d.ts +6 -3
- package/lib/types/client/activity-monitor.d.ts +13 -4
- package/lib/types/client/locales.d.ts +14 -0
- package/lib/types/harness-compat.d.ts +63 -16
- package/lib/types/mailbox.d.ts +2 -0
- package/lib/types/members.d.ts +5 -17
- package/lib/types/snapshot.d.ts +12 -7
- package/lib/types/state.d.ts +10 -3
- package/lib/types/types.d.ts +5 -0
- package/lib/types/web-routes.d.ts +2 -0
- package/lib/types/workspace-audit-service.d.ts +35 -0
- package/lib/types/workspace-audit-worker.d.ts +1 -0
- package/lib/web-routes.js +31 -0
- package/lib/workspace-audit-service.js +165 -0
- package/lib/workspace-audit-worker.js +11 -0
- package/lib/workspace-audit.js +6 -5
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +69 -64
- package/pnpm-workspace.yaml +306 -273
- package/release-notes/v0.1.25.md +16 -0
- package/release-notes/v0.1.26.md +19 -0
- package/release-notes/v0.1.27.md +42 -0
- package/release-notes/v0.1.28.md +45 -0
- package/release-notes/v0.1.29.md +23 -0
- package/release-notes/v1.1.0.md +42 -0
- package/release-notes/v2.0.0.md +17 -0
- package/scripts/artwork-role-match.test.mjs +517 -0
- package/scripts/capabilities.test.mjs +301 -0
- package/scripts/check-install-channel.mjs +55 -0
- package/scripts/check-install-channel.test.mjs +39 -0
- package/scripts/clean-build.mjs +14 -0
- package/scripts/client-harness-migration.test.mjs +46 -0
- package/scripts/compatibility.mjs +20 -0
- package/scripts/compatibility.test.mjs +187 -0
- package/scripts/corrupt-teamjson.test.mjs +180 -0
- package/scripts/custom-artwork.test.mjs +273 -0
- package/scripts/fallback-tdd.mjs +61 -0
- package/scripts/fixtures/harness-benchmark-scope.mjs +16 -0
- package/scripts/fixtures/harness-benchmark-scope.test.mjs +18 -0
- package/scripts/fixtures/harness-complex-case.mjs +201 -0
- package/scripts/fixtures/harness-complex-case.test.mjs +21 -0
- package/scripts/fixtures/harness-complex-oracle.mjs +63 -0
- package/scripts/fixtures/harness-issue-case.mjs +51 -0
- package/scripts/fixtures/harness-issue159-case.mjs +28 -0
- package/scripts/fixtures/harness-model-case.mjs +127 -0
- package/scripts/fixtures/harness-model-case.test.mjs +37 -0
- package/scripts/fixtures/harness-model-driver.mjs +100 -0
- package/scripts/fixtures/harness-runtime-credentials.mjs +23 -0
- package/scripts/fixtures/harness-runtime-entry.mjs +171 -0
- package/scripts/fixtures/harness-runtime-idle.mjs +42 -0
- package/scripts/fixtures/harness-runtime-llm.mjs +193 -0
- package/scripts/fixtures/harness-runtime-protocol.mjs +187 -0
- package/scripts/fixtures/harness-runtime-resume.mjs +24 -0
- package/scripts/fixtures/harness-runtime-stability.mjs +282 -0
- package/scripts/fixtures/harness-runtime-tools.mjs +13 -0
- package/scripts/fixtures/harness-runtime-web-approval.mjs +341 -0
- package/scripts/fixtures/issue-336-audit-worker.mjs +18 -0
- package/scripts/git-artifacts.mjs +64 -0
- package/scripts/git-artifacts.test.mjs +32 -0
- package/scripts/harness-compat-tdd.mjs +492 -0
- package/scripts/harness-issue-verify.mjs +26 -0
- package/scripts/harness-model-benchmark.mjs +163 -0
- package/scripts/harness-runtime-platform.test.mjs +31 -0
- package/scripts/harness-runtime-scenarios.mjs +297 -0
- package/scripts/harness-runtime-verify.mjs +169 -0
- package/scripts/harness-source-verify.mjs +211 -0
- package/scripts/harness-source-verify.test.mjs +97 -0
- package/scripts/harness-validation.mjs +68 -0
- package/scripts/harness-validation.test.mjs +95 -0
- package/scripts/http-body.test.mjs +72 -0
- package/scripts/import-vendor-artwork.mjs +78 -0
- package/scripts/inline-plan-blank-optional-tdd.mjs +121 -0
- package/scripts/issue-159.test.mjs +78 -0
- package/scripts/issue-188.test.mjs +148 -0
- package/scripts/issue-189.test.mjs +100 -0
- package/scripts/issue-203-card.test.mjs +181 -0
- package/scripts/issue-205.test.mjs +163 -0
- package/scripts/issue-234.test.mjs +424 -0
- package/scripts/issue-236-stale-module.test.mjs +63 -0
- package/scripts/issue-236.test.mjs +59 -0
- package/scripts/issue-262.test.mjs +98 -0
- package/scripts/issue-336.test.mjs +404 -0
- package/scripts/legacy-session-source-repair.test.mjs +201 -0
- package/scripts/lifecycle-verify.mjs +1573 -0
- package/scripts/lineage-identity.test.mjs +77 -0
- package/scripts/member-failure-tdd.mjs +451 -0
- package/scripts/member-spawn-recovery.test.mjs +92 -0
- package/scripts/quality-gates-amend.test.mjs +161 -0
- package/scripts/quality-gates-content-bound.test.mjs +572 -0
- package/scripts/quality-gates-cross-binding.test.mjs +184 -0
- package/scripts/quality-gates-excluded-scope.test.mjs +163 -0
- package/scripts/quality-gates-repair-scope.test.mjs +143 -0
- package/scripts/quality-gates-repair-wiring.test.mjs +189 -0
- package/scripts/quality-gates-tdd.mjs +1238 -0
- package/scripts/quality-gates-work-order.test.mjs +494 -0
- package/scripts/readme-version.mjs +89 -0
- package/scripts/readme-version.test.mjs +77 -0
- package/scripts/release-metadata.mjs +45 -0
- package/scripts/release-metadata.test.mjs +66 -0
- package/scripts/scoped-release.test.mjs +52 -0
- package/scripts/stability-tdd.mjs +144 -0
- package/scripts/stress-verify.mjs +548 -0
- package/scripts/symlink-support.mjs +46 -0
- package/scripts/sync-skill.mjs +103 -0
- package/scripts/tool-policies.test.mjs +280 -0
- package/scripts/update-skills.mjs +105 -0
- package/scripts/update-skills.test.mjs +79 -0
- package/scripts/upgrade-status.mjs +66 -0
- package/scripts/upgrade-status.test.mjs +83 -0
- package/scripts/verify-package.mjs +73 -0
- package/scripts/verify.mjs +2199 -0
- package/scripts/web-routes-verify.mjs +142 -0
- package/scripts/workspace-activity.test.mjs +346 -0
- package/scripts/workspace-summary.test.mjs +49 -0
- package/src/artifacts.ts +487 -0
- package/src/artwork-source.ts +262 -0
- package/src/capabilities.ts +113 -0
- package/src/client/ActivityPanel.module.css +2390 -0
- package/src/client/ActivityPanel.tsx +1507 -0
- package/src/client/AgentTeamsCard.module.css +148 -0
- package/src/client/AgentTeamsCard.tsx +155 -0
- package/src/client/StagingPlanEditor.tsx +829 -0
- package/src/client/TeamChatEntry.tsx +27 -0
- package/src/client/WorkspaceActivity.module.css +41 -0
- package/src/client/WorkspaceActivity.tsx +137 -0
- package/src/client/activity-model.ts +372 -0
- package/src/client/activity-monitor.ts +440 -0
- package/src/client/agent-teams-card-definition.ts +250 -0
- package/src/client/artwork.ts +374 -0
- package/src/client/icons.tsx +17 -0
- package/src/client/index.tsx +140 -0
- package/src/client/locales.ts +481 -0
- package/src/client/panel-geometry.ts +194 -0
- package/src/client/session-navigation.ts +73 -0
- package/src/client/workspace-state.ts +52 -0
- package/src/command.ts +145 -0
- package/src/css-modules.d.ts +4 -0
- package/src/event-types.ts +177 -0
- package/src/events.ts +78 -0
- package/src/harness-compat.ts +570 -0
- package/src/index.ts +599 -0
- package/src/lineage.ts +248 -0
- package/src/mailbox.ts +185 -0
- package/src/members.ts +1230 -0
- package/src/profiles.ts +765 -0
- package/src/quality-gates.ts +2124 -0
- package/src/scheduler.ts +554 -0
- package/src/snapshot.ts +333 -0
- package/src/state.ts +1317 -0
- package/src/tool-names.ts +14 -0
- package/src/tool-policies.ts +219 -0
- package/src/tools.ts +2939 -0
- package/src/types.ts +414 -0
- package/src/web-routes.ts +128 -0
- package/src/workspace-audit-service.ts +182 -0
- package/src/workspace-audit-worker.ts +12 -0
- package/src/workspace-audit.ts +57 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Regression tests for issue #175: repair rounds are not wired to the
|
|
4
|
+
* findings they fix.
|
|
5
|
+
*
|
|
6
|
+
* A · `planQualityFollowUp()` generated a `repair` that depended only on its
|
|
7
|
+
* automatically-derived upstream (the implementation the review judged), never
|
|
8
|
+
* on the failed gate task whose findings it fixes. The causal edge exists in
|
|
9
|
+
* the transcript but not in the graph, so `canDeclareDelivery()` reported
|
|
10
|
+
* `failed without a follow-up repair` for findings that were already fixed and
|
|
11
|
+
* independently re-verified downstream.
|
|
12
|
+
*
|
|
13
|
+
* B · Auto-repair fired for a failed `review` but not for a failed
|
|
14
|
+
* `verification`: both are quality gates with the same
|
|
15
|
+
* findings → repair → re-check contract, yet only the review path self-healed.
|
|
16
|
+
*
|
|
17
|
+
* Run: node --test scripts/quality-gates-repair-wiring.test.mjs
|
|
18
|
+
*/
|
|
19
|
+
import test from 'node:test'
|
|
20
|
+
import assert from 'node:assert/strict'
|
|
21
|
+
import { canDeclareDelivery, planQualityFollowUp } from '../lib/quality-gates.js'
|
|
22
|
+
import { unsatisfiedDependencies } from '../lib/state.js'
|
|
23
|
+
|
|
24
|
+
function member(name, role) {
|
|
25
|
+
return { id: `member-${name}`, name, role, joinedAt: 0, status: 'idle' }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function baseTeam(tasks) {
|
|
29
|
+
return {
|
|
30
|
+
name: 't', id: 't', description: '', captainSessionId: 'captain',
|
|
31
|
+
createdAt: 0, taskSeq: tasks.length,
|
|
32
|
+
members: [member('implementer', 'implementer'), member('reviewer', 'reviewer'), member('verifier', 'verifier')],
|
|
33
|
+
tasks,
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function implementation(extra = {}) {
|
|
38
|
+
return {
|
|
39
|
+
id: 't1', subject: 'impl', status: 'completed', dependencies: [],
|
|
40
|
+
createdAt: 0, updatedAt: 0, attempt: 1, kind: 'implementation',
|
|
41
|
+
assignee: 'implementer', inScope: ['src/'], acceptance: ['done'], verify: ['node --test'],
|
|
42
|
+
changedPaths: ['src/app.js'],
|
|
43
|
+
acceptanceResults: [{ criterion: 'done', status: 'passed' }],
|
|
44
|
+
commandsRun: [{ command: 'node --test', status: 'passed', exitCode: 0 }],
|
|
45
|
+
...extra,
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function failedReview(extra = {}) {
|
|
50
|
+
return {
|
|
51
|
+
id: 't2', subject: 'review-round-1', status: 'failed', dependencies: ['t1'],
|
|
52
|
+
createdAt: 0, updatedAt: 0, attempt: 1, kind: 'review', round: 1,
|
|
53
|
+
assignee: 'reviewer', verdict: 'needs_revision', reviewedTaskId: 't1',
|
|
54
|
+
objective: 'Review', acceptance: ['no blockers'],
|
|
55
|
+
findings: [{ id: 'F1', severity: 'high', problem: 'p', requiredFix: 'fix src/app.js', file: 'src/app.js' }],
|
|
56
|
+
...extra,
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function failedVerification(extra = {}) {
|
|
61
|
+
return {
|
|
62
|
+
id: 't3', subject: 'verification', status: 'failed', dependencies: ['t1'],
|
|
63
|
+
createdAt: 0, updatedAt: 0, attempt: 1, kind: 'verification',
|
|
64
|
+
assignee: 'verifier',
|
|
65
|
+
acceptance: ['Declared verification commands pass'],
|
|
66
|
+
verify: ['node --test'],
|
|
67
|
+
acceptanceResults: [{ criterion: 'Declared verification commands pass', status: 'failed', evidence: 'EXIT=2' }],
|
|
68
|
+
commandsRun: [{ command: 'node --test', status: 'failed', exitCode: 2, evidence: 'half-written symbols' }],
|
|
69
|
+
output: 'two gates failed',
|
|
70
|
+
...extra,
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
test('#175A: a generated repair records the failed gate whose findings it fixes', () => {
|
|
75
|
+
const team = baseTeam([implementation(), failedReview()])
|
|
76
|
+
const planned = planQualityFollowUp(team, team.tasks[1])
|
|
77
|
+
const repair = planned.created.find((item) => item.kind === 'repair')
|
|
78
|
+
assert.ok(repair, 'no repair generated')
|
|
79
|
+
assert.deepEqual(
|
|
80
|
+
repair.findingSourceTaskIds,
|
|
81
|
+
['t2'],
|
|
82
|
+
`the causal edge to the failed gate t2 is missing: ${JSON.stringify(repair.findingSourceTaskIds)}`,
|
|
83
|
+
)
|
|
84
|
+
assert.ok(repair.dependencies.includes('t1'), 'repair lost its upstream dependency')
|
|
85
|
+
})
|
|
86
|
+
|
|
87
|
+
test('#175A: a failed gate cannot be a dependency edge, or the repair could never be claimed', () => {
|
|
88
|
+
// Why the causal link is a dedicated field: `unsatisfiedDependencies` only
|
|
89
|
+
// accepts dependencies whose status is `completed`, and a failed task never
|
|
90
|
+
// reaches it. Putting t2 into `dependencies` would dead-lock every generated
|
|
91
|
+
// repair, so the graph records the causality without that edge.
|
|
92
|
+
const team = baseTeam([implementation(), failedReview()])
|
|
93
|
+
const planned = planQualityFollowUp(team, team.tasks[1])
|
|
94
|
+
const repair = planned.created.find((item) => item.kind === 'repair')
|
|
95
|
+
const task = { ...repair, id: 't9', status: 'pending', createdAt: 0, updatedAt: 0, attempt: 0 }
|
|
96
|
+
const withFailedEdge = { ...task, dependencies: [...task.dependencies, 't2'] }
|
|
97
|
+
assert.deepEqual(
|
|
98
|
+
unsatisfiedDependencies([...team.tasks, withFailedEdge], withFailedEdge.dependencies),
|
|
99
|
+
['t2'],
|
|
100
|
+
'a failed dependency is not treated as satisfied',
|
|
101
|
+
)
|
|
102
|
+
assert.deepEqual(unsatisfiedDependencies([...team.tasks, task], task.dependencies), [])
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
test('#175A: delivery does not report a false "failed without a follow-up repair" for a fixed verification', () => {
|
|
106
|
+
const repair = {
|
|
107
|
+
id: 't4', subject: 'repair-round-1', status: 'completed', dependencies: ['t1'],
|
|
108
|
+
createdAt: 0, updatedAt: 0, attempt: 1, kind: 'repair', round: 1,
|
|
109
|
+
assignee: 'implementer', inScope: ['src/'], acceptance: ['fix it'], verify: ['node --test'],
|
|
110
|
+
sourceTaskId: 't1', sourceFindingIds: ['VF1'],
|
|
111
|
+
changedPaths: ['src/app.js'],
|
|
112
|
+
acceptanceResults: [{ criterion: 'fix it', status: 'passed' }],
|
|
113
|
+
commandsRun: [{ command: 'node --test', status: 'passed', exitCode: 0 }],
|
|
114
|
+
}
|
|
115
|
+
const verification = failedVerification({
|
|
116
|
+
findings: [{ id: 'VF1', severity: 'high', problem: 'p', requiredFix: 'fix src/app.js', file: 'src/app.js' }],
|
|
117
|
+
})
|
|
118
|
+
const review = {
|
|
119
|
+
id: 't5', subject: 'review-round-1', status: 'completed', dependencies: ['t4'],
|
|
120
|
+
createdAt: 0, updatedAt: 0, attempt: 1, kind: 'review', round: 1,
|
|
121
|
+
assignee: 'reviewer', verdict: 'pass', reviewedTaskId: 't4',
|
|
122
|
+
objective: 'Review', acceptance: ['no blockers'],
|
|
123
|
+
reviewedAttempt: 1,
|
|
124
|
+
}
|
|
125
|
+
const team = baseTeam([implementation(), verification, repair, review])
|
|
126
|
+
const delivery = canDeclareDelivery(team)
|
|
127
|
+
assert.ok(
|
|
128
|
+
!delivery.blockers.some((item) => item.includes('t3 failed without a follow-up repair')),
|
|
129
|
+
`false blocker still reported: ${JSON.stringify(delivery.blockers)}`,
|
|
130
|
+
)
|
|
131
|
+
})
|
|
132
|
+
|
|
133
|
+
test('#175B: a failed verification produces a repair + re-check round automatically', () => {
|
|
134
|
+
const team = baseTeam([implementation(), failedVerification()])
|
|
135
|
+
const planned = planQualityFollowUp(team, team.tasks[1])
|
|
136
|
+
const repair = planned.created.find((item) => item.kind === 'repair')
|
|
137
|
+
assert.ok(repair, 'a failed verification produced no repair round')
|
|
138
|
+
assert.deepEqual(
|
|
139
|
+
repair.findingSourceTaskIds,
|
|
140
|
+
['t3'],
|
|
141
|
+
`repair does not record the failed verification t3: ${JSON.stringify(repair.findingSourceTaskIds)}`,
|
|
142
|
+
)
|
|
143
|
+
assert.ok(repair.acceptance.length > 0, 'repair has no acceptance derived from the failure')
|
|
144
|
+
assert.deepEqual(repair.verify, ['node --test'])
|
|
145
|
+
const recheck = planned.created.find((item) => item.id !== repair.id)
|
|
146
|
+
assert.ok(recheck, 'a failed verification produced no re-check round')
|
|
147
|
+
assert.equal(recheck.kind, 'verification')
|
|
148
|
+
assert.deepEqual(recheck.dependencies, [repair.id])
|
|
149
|
+
})
|
|
150
|
+
|
|
151
|
+
test('#175B: the verification re-check is not a review and carries the same verify commands', () => {
|
|
152
|
+
const team = baseTeam([implementation(), failedVerification()])
|
|
153
|
+
const planned = planQualityFollowUp(team, team.tasks[1])
|
|
154
|
+
const recheck = planned.created.find((item) => item.kind === 'verification')
|
|
155
|
+
assert.ok(recheck)
|
|
156
|
+
assert.deepEqual(recheck.verify, ['node --test'])
|
|
157
|
+
assert.equal(recheck.reviewedTaskId, undefined)
|
|
158
|
+
})
|
|
159
|
+
|
|
160
|
+
test('#175B: a failed verification still respects the repair ceiling', () => {
|
|
161
|
+
const priorRepairs = [1, 2].map((round) => ({
|
|
162
|
+
id: `t${10 + round}`, subject: `repair-round-${round}`, status: 'completed', dependencies: ['t1'],
|
|
163
|
+
createdAt: 0, updatedAt: 0, attempt: 1, kind: 'repair', round,
|
|
164
|
+
assignee: 'implementer', inScope: ['src/'], acceptance: ['x'],
|
|
165
|
+
sourceTaskId: 't1', sourceFindingIds: [],
|
|
166
|
+
}))
|
|
167
|
+
const team = baseTeam([implementation(), failedVerification(), ...priorRepairs])
|
|
168
|
+
const planned = planQualityFollowUp(team, team.tasks[1])
|
|
169
|
+
assert.equal(planned.created.length, 0)
|
|
170
|
+
assert.equal(planned.escalated, true)
|
|
171
|
+
})
|
|
172
|
+
|
|
173
|
+
test('#175: a failed review whose findings were fixed stays closed in the delivery graph', () => {
|
|
174
|
+
const repair = {
|
|
175
|
+
id: 't4', subject: 'repair-round-2', status: 'completed', dependencies: ['t1'],
|
|
176
|
+
createdAt: 0, updatedAt: 0, attempt: 1, kind: 'repair', round: 2,
|
|
177
|
+
assignee: 'implementer', inScope: ['src/'], acceptance: ['fix it'], verify: ['node --test'],
|
|
178
|
+
sourceTaskId: 't1', sourceFindingIds: ['F1'],
|
|
179
|
+
changedPaths: ['src/app.js'],
|
|
180
|
+
acceptanceResults: [{ criterion: 'fix it', status: 'passed' }],
|
|
181
|
+
commandsRun: [{ command: 'node --test', status: 'passed', exitCode: 0 }],
|
|
182
|
+
}
|
|
183
|
+
const team = baseTeam([implementation(), failedReview(), repair])
|
|
184
|
+
const delivery = canDeclareDelivery(team)
|
|
185
|
+
assert.ok(
|
|
186
|
+
!delivery.blockers.some((item) => item.includes('t2 failed without a follow-up repair')),
|
|
187
|
+
`false blocker for a closed review loop: ${JSON.stringify(delivery.blockers)}`,
|
|
188
|
+
)
|
|
189
|
+
})
|