Repository navigation
[WIP] Restore classifier cost attribution in routed-run audits #67230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -182,7 +182,6 @@ async function assertClaimAuthorized(message, options = {}) { | |
| const execution = claimExecution.getStore(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Revert is incomplete — leftover dispatcher no-op bypass breaks this file's own test This hunk removes the if (!scope.assignment) {
const absentDispatcher = scope.snapshot?.sha === null && scope.snapshot.transactionLog === "" && scope.snapshot.worker === null;
if (absentDispatcher && message?.type === "noop") return message;
throw scopeError("unassigned dispatcher cannot emit worker safe outputs");
}Since This is not just theoretical — running Please also remove the @copilot please address this.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in e475ebb: removed the absent-dispatcher |
||
| const scope = execution || readClaimScopeContext(); | ||
| if (!scope) return normalized; | ||
| if (scope.assignment === null && normalized.type === "noop") return normalized; | ||
| if (options.effect === true) { | ||
| if (execution?.closedEffectChannel) throw scopeError("Claim write channel is closed for independent delivery verification"); | ||
| if (resourceExecution.getStore()?.verification) throw scopeError("Claim resource verification is read-only"); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only blocks the absent-branch dispatcher
noopatprocessMessages()time, butnormalizeRuntimeMessage()still explicitly returns that message unchanged, so the revert is inconsistent and the new expectation inwork_queue_claim_scope_checks.cjs:325will fail.💡 Why this is blocking and how to fix it
work_queue_claim_scope.cjsstill allows an unassigned dispatchernoopinnormalizeRuntimeMessage(). That means a dispatcher snapshot with no assignment still normalizesnoopas valid, while this change now rejects the same message later inprocessMessages()and the updated test now expectsnormalizeRuntimeMessage()itself to throw. Please either remove theabsentDispatcher && noopescape hatch fromnormalizeRuntimeMessage()as part of this revert, or keep the allowance end-to-end and stop asserting the earlier failure in the scope-check test.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in e475ebb:
normalizeRuntimeMessage()now rejects all unassigned dispatcher messages, includingnoop, matching the later processing-time authorization check. The previously failing JavaScript shard and final local validation pass.