Skip to content

Commit 0fb828e

Browse files
author
Gio Della-Libera
committed
fix(policy): keep checks read-only
1 parent e9e4166 commit 0fb828e

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

extensions/policy/src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ async function buildPolicyCheckReport(
7979
if (severityMin === null) {
8080
throw new Error("Invalid --severity-min value. Expected one of: info, warning, error.");
8181
}
82-
const snapshot = await readConfigFileSnapshot();
82+
const snapshot = await readConfigFileSnapshot({ observe: false });
8383
if (!snapshot.valid) {
8484
const findings: HealthFinding[] = snapshot.issues.map((issue) => ({
8585
checkId: "policy/config-invalid",

extensions/telegram/src/bot-handlers.runtime.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1783,10 +1783,7 @@ export const registerTelegramHandlers = ({
17831783
debounceLane,
17841784
})
17851785
: null;
1786-
const authorizedAbortControlMessage = senderId
1787-
? await isAuthorizedAbortControlMessage()
1788-
: false;
1789-
if (authorizedAbortControlMessage) {
1786+
if (senderId && (await isAuthorizedAbortControlMessage())) {
17901787
for (const lane of ["default", "forward"] as const) {
17911788
inboundDebouncer.cancelKey(
17921789
buildTelegramInboundDebounceKey({
@@ -1804,7 +1801,7 @@ export const registerTelegramHandlers = ({
18041801
allMedia,
18051802
storeAllowFrom,
18061803
receivedAtMs: Date.now(),
1807-
debounceKey: authorizedAbortControlMessage ? null : debounceKey,
1804+
debounceKey: isAbortControlMessage ? null : debounceKey,
18081805
debounceLane,
18091806
botUsername,
18101807
...promptContextBoundaryOptions(promptContextMinTimestampMs),

0 commit comments

Comments
 (0)