Skip to content

Commit 7b2cdf7

Browse files
committed
fix(service-automation, objectql): keep each message's literal-piece count unchanged
The reworded texts now span the same number of concatenated template pieces and source lines as before, so a projection with comments and literal content blanked is byte-identical to the base for every changed file. Claude-Session: https://claude.ai/code/session_01WkL6Eijt432S1Y7ekb6ovQ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 6215705 commit 7b2cdf7

3 files changed

Lines changed: 5 additions & 10 deletions

File tree

‎packages/objectql/src/hook-run-as.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,8 @@ export class HookUnscopedDataAccessError extends Error {
117117
.join(', ');
118118
super(
119119
`[runAs] refusing a data operation (${where}): this hook's runAs is 'user' but no trigger user ` +
120-
`could be resolved, so the operation cannot be restricted to a user. ` +
121-
`Without one it would carry no principal: ` +
122-
`refused by the security plugin where one is composed, unscoped where none is. ` +
123-
`Declare \`runAs: 'system'\` on the hook to make the elevation ` +
120+
`could be resolved, so the operation cannot be restricted to a user. Without one it would carry no principal: ` +
121+
`refused by the security plugin where one is composed, unscoped where none is. Declare \`runAs: 'system'\` on the hook to make the elevation ` +
124122
`explicit and intended, or arrange for the trigger to supply a user (a write made with a system ` +
125123
`context carries none). Branch on \`code === '${HOOK_UNSCOPED_DATA_ACCESS_CODE}'\` (ADR-0112) ` +
126124
`to detect this. (ADR-0049)`,

‎packages/services/service-automation/src/engine.ts‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6133,8 +6133,7 @@ export class AutomationEngine implements IAutomationService {
61336133
this.logger.warn(
61346134
`[runAs] flow '${flow.name}' executes with runAs:'user' but its trigger resolved no user ` +
61356135
`— its data operations will be REFUSED. Without a user they would carry no principal: ` +
6136-
`refused by the security plugin where one is composed, unscoped where none is ` +
6137-
`(the fail-open ADR-0049 forbids). ` +
6136+
`refused by the security plugin where one is composed, unscoped where none is (the fail-open ADR-0049 forbids). ` +
61386137
`Declare runAs:'system' to make the elevation explicit and intended, or arrange ` +
61396138
`for the trigger to supply a user. Note a user-less trigger is NOT only a schedule: a ` +
61406139
`record-change flow fired by a system write carries no user either (ADR-0049).`,

‎packages/services/service-automation/src/runtime-identity.ts‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,8 @@ export class UnscopedRunDataAccessError extends Error {
8686
.join(', ');
8787
super(
8888
`[runAs] refusing a data operation${where ? ` (${where})` : ''}: this run's effective runAs is ` +
89-
`'user' but no trigger user could be resolved, so the operation cannot be restricted to a user. ` +
90-
`Without one it would carry no principal: ` +
91-
`refused by the security plugin where one is composed, unscoped where none is. ` +
92-
`Declare \`runAs: 'system'\` on the ` +
89+
`'user' but no trigger user could be resolved, so the operation cannot be restricted to a user. Without one it would carry no principal: ` +
90+
`refused by the security plugin where one is composed, unscoped where none is. Declare \`runAs: 'system'\` on the ` +
9391
`flow to make the elevation explicit and intended, or arrange for the trigger to supply a user ` +
9492
`(a write made with a system context carries none). (ADR-0049)`,
9593
);

0 commit comments

Comments
 (0)