Skip to content

Commit e137917

Browse files
authored
refactor: delete verified dead surface and retained dispatch arguments (#1106)
Deletes twelve verified dead-surface items (~1,443 net lines): the orphan exact-review batch coordinator prototype and its publisher runtime (production uses the command state machine via repair:exact-review-batch), a superseded git compactor, two unreferenced JSON schemas (one had already diverged from the live validator), a test-only PR-title generator, the unauthenticated state-writer progress reporter, a test-only spool reader and intent reparser, a stranded recovery-advisor schema, an unloaded prompt, two ignored workflow model inputs, and two dead package-script aliases. Every item carries grep evidence and a named live replacement in the PR body. Review caught a would-be outage before merge: sweep.yml still dispatched the intake workflow with -f model=internal after the input deletion, and GitHub rejects workflow-dispatch payloads with undeclared inputs. The caller is removed alongside the input; a multi-line caller grep proves no dispatcher of either touched workflow still passes model. Proof: a real workflow dispatch of repair-issue-implementation-intake on the updated head was accepted (run 31420545428; it intentionally no-ops to failure on a nonexistent report path after acceptance -- acceptance is the guarded property). All gates green including active-surface and limits.
1 parent 59904fe commit e137917

25 files changed

Lines changed: 61 additions & 1489 deletions

‎.github/workflows/repair-issue-implementation-intake.yml‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ on:
4949
required: false
5050
default: blacksmith-16vcpu-ubuntu-2404
5151
type: string
52-
model:
53-
description: "Internal Codex model alias"
54-
required: false
55-
default: internal
56-
type: string
57-
5852
permissions:
5953
contents: write
6054
actions: read

‎.github/workflows/spam-scanner.yml‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@ on:
4040
required: false
4141
default: ""
4242
type: string
43-
model:
44-
description: "Internal Codex model alias"
45-
required: true
46-
default: internal
47-
type: string
4843
schedule:
4944
- cron: "17 * * * *"
5045

‎.github/workflows/sweep.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4776,8 +4776,7 @@ jobs:
47764776
-f candidate_kind=viable \
47774777
-f report_repo=openclaw/clawsweeper-state \
47784778
-f report_path="$report_path" \
4779-
-f report_url="$report_url" \
4780-
-f model=internal
4779+
-f report_url="$report_url"
47814780
done < /tmp/viable-implementation-candidates.tsv
47824781
47834782
- name: Dispatch background review comment sync

‎package.json‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
"repair:state-delta-paths": "node dist/repair/state-delta-paths.js",
4040
"repair:resolve-result-targets": "node dist/repair/resolve-result-targets.js",
4141
"repair:import-gitcrawl-low-signal": "node dist/repair/import-gitcrawl-low-signal-prs.js",
42-
"repair:import-ghcrawl": "node dist/repair/import-gitcrawl-clusters.js",
43-
"repair:import-low-signal": "node dist/repair/import-gitcrawl-low-signal-prs.js",
4442
"repair:worker": "node dist/repair/run-worker.js",
4543
"repair:action-session": "node dist/repair/action-session.js",
4644
"repair:collect-codex-debug": "node dist/repair/collect-codex-debug.js",

‎prompts/repair/review-result.md‎

Lines changed: 0 additions & 13 deletions
This file was deleted.

‎schema/assist-artifact.schema.json‎

Lines changed: 0 additions & 90 deletions
This file was deleted.

‎schema/repair/job.schema.json‎

Lines changed: 0 additions & 107 deletions
This file was deleted.

‎schema/repair/recovery-advisor.schema.json‎

Lines changed: 0 additions & 27 deletions
This file was deleted.

‎src/action-ledger.ts‎

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,48 +1200,6 @@ function parseActionEventShardImportCompletion(
12001200
}
12011201
}
12021202

1203-
export function readSpooledActionEvents(
1204-
root: string | SafeReadRoot,
1205-
repository: string,
1206-
): ActionEvent[] {
1207-
const safeRoot =
1208-
typeof root === "string" ? prepareSafeReadRoot(root, "action event spool") : root;
1209-
const normalizedRepository = requiredRepo(repository);
1210-
const relativeDirectory = path.join(
1211-
".clawsweeper-repair",
1212-
"action-events",
1213-
actionEventSpoolRepositoryDirectory(normalizedRepository),
1214-
);
1215-
let entries;
1216-
try {
1217-
entries = readDirectoryEntriesNoFollow(
1218-
safeRoot,
1219-
relativeDirectory,
1220-
"action event spool",
1221-
ACTION_EVENT_SPOOL_READ_LIMITS.maxEntriesPerRepository,
1222-
);
1223-
} catch (error) {
1224-
if (isNotFoundError(error)) return [];
1225-
throw error;
1226-
}
1227-
const budget = createActionEventSpoolReadBudget();
1228-
for (const entry of entries) {
1229-
if (!entry.isFile()) {
1230-
throw new Error(
1231-
`refusing unsafe action event spool entry: ${path.join(relativeDirectory, entry.name)}`,
1232-
);
1233-
}
1234-
if (!entry.name.endsWith(".json")) continue;
1235-
const relativePath = path.join(relativeDirectory, entry.name);
1236-
const event = readActionEventTarget(
1237-
prepareSafeReadTarget(safeRoot, relativePath, "action event spool entry"),
1238-
);
1239-
assertCanonicalSpooledEventPath(event, relativePath, normalizedRepository);
1240-
retainSpooledActionEvent(budget, event);
1241-
}
1242-
return budget.events.sort(compareEvents);
1243-
}
1244-
12451203
export function readAllSpooledActionEvents(root: string | SafeReadRoot): ActionEvent[] {
12461204
const safeRoot =
12471205
typeof root === "string" ? prepareSafeReadRoot(root, "action event spool") : root;

‎src/repair/cluster-intake-state.ts‎

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -349,35 +349,6 @@ export function acceptClusterIntakeIntent(value: unknown, secret: string): Clust
349349
};
350350
}
351351

352-
export function clusterIntakeIntent(value: unknown): ClusterIntakeIntent {
353-
const proposal = clusterIntakeProposal(value);
354-
if (!isRecord(value) || !Array.isArray(value.jobs)) {
355-
throw new Error("invalid accepted cluster intake intent");
356-
}
357-
const rawJobs = value.jobs;
358-
const jobs = proposal.jobs.map((job, index): ClusterIntakeJob => {
359-
const raw = rawJobs[index];
360-
if (!isRecord(raw)) throw new Error("cluster intake job must be an object");
361-
const acceptedIntentDigest = String(raw.accepted_intent_digest || "")
362-
.trim()
363-
.toLowerCase();
364-
const acceptedIntentReceipt = String(raw.accepted_intent_receipt || "").trim();
365-
const expectedDigest = clusterAcceptedIntentDigest(clusterAcceptedIntentFields(proposal, job));
366-
if (acceptedIntentDigest !== expectedDigest) {
367-
throw new Error(`cluster accepted-intent digest mismatch: ${job.cluster_id}`);
368-
}
369-
if (!/^sha256=[a-f0-9]{64}$/.test(acceptedIntentReceipt)) {
370-
throw new Error(`invalid cluster accepted-intent receipt: ${job.cluster_id}`);
371-
}
372-
return {
373-
...job,
374-
accepted_intent_digest: acceptedIntentDigest,
375-
accepted_intent_receipt: acceptedIntentReceipt,
376-
};
377-
});
378-
return { ...proposal, jobs };
379-
}
380-
381352
export function clusterAcceptedIntentDigest(fields: ClusterAcceptedIntentFields): string {
382353
return createHash("sha256")
383354
.update(

0 commit comments

Comments
 (0)