mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-20 23:20:46 +00:00
fix(automation): gate ready-state follow-ups and research web denials
Only automation bot PRs re-check source-issue pending comments before mark-ready, so maintainer Fixes-only PRs are not stuck draft. Write WebSearch/WebFetch denials after the isolated research pass so classify and follow-up research can still call those tools.
This commit is contained in:
1 parent
46864fce51
commit
2840463b3d
4 files changed
+208
-21
No files matched your search
@@ -88,6 +88,10 @@ Terminal codex_loop outcomes always drop `automation:codex-loop`:
|
||||
source-linked notes are passed to classify, implement, or follow-up agents.
|
||||
The workflow also verifies the CLI stream contains a real WebSearch/WebFetch
|
||||
tool event; an answer that merely prints a URL is rejected.
|
||||
- User-level WebSearch/WebFetch denials are written only after that research
|
||||
pass (or in implement/fix jobs that never research). Pre-research sandbox
|
||||
setup enables the command sandbox without denying web tools, so research is
|
||||
not blocked by the later classify/follow-up denylist.
|
||||
- WebSearch and WebFetch are explicitly denied again for classify, implement,
|
||||
follow-up, and fix agents. Those stages cannot silently perform another web
|
||||
request outside the isolated research pass.
|
||||
@@ -116,7 +120,9 @@ compares the new information with the current diff:
|
||||
- contradiction, larger scope, unsafe update, or no active PR needing work:
|
||||
acknowledge the reporter and hand the issue/PR to a maintainer.
|
||||
|
||||
Every clean-to-ready transition re-checks the source issue. A PR cannot become
|
||||
ready while an eligible author/maintainer follow-up is still unprocessed. Patch
|
||||
publication also verifies the PR head has not moved, so a follow-up update never
|
||||
overwrites a concurrent maintainer or automation push.
|
||||
Every clean-to-ready transition re-checks the source issue for automation bot
|
||||
PRs only (`automation:bot-pr` / bot PR marker). A maintainer PR that merely
|
||||
says `Fixes #N` is not kept draft solely because issue comments lack automation
|
||||
processed markers. Patch publication also verifies the PR head has not moved,
|
||||
so a follow-up update never overwrites a concurrent maintainer or automation
|
||||
push.
|
||||
@@ -521,19 +521,13 @@ jobs:
|
||||
mkdir -p .cursor-runtime
|
||||
agent sandbox reset
|
||||
agent sandbox enable
|
||||
# Enable sandbox + block shell network only. Do NOT deny built-in
|
||||
# web tools yet — the isolated research pass must still call them.
|
||||
node -e '
|
||||
const fs = require("node:fs");
|
||||
const p = process.env.HOME + "/.cursor/cli-config.json";
|
||||
const c = JSON.parse(fs.readFileSync(p, "utf8"));
|
||||
c.sandbox = { ...(c.sandbox || {}), mode: "enabled", networkAccess: "user_config" };
|
||||
c.permissions = {
|
||||
...(c.permissions || {}),
|
||||
deny: [...new Set([
|
||||
...(c.permissions?.deny || []),
|
||||
"WebSearch(*)",
|
||||
"WebFetch(*)",
|
||||
])],
|
||||
};
|
||||
fs.writeFileSync(p, JSON.stringify(c, null, 2) + "\n");
|
||||
'
|
||||
agent sandbox run --sandbox bash -c 'touch .cursor-runtime/sandbox-check'
|
||||
@@ -626,6 +620,26 @@ jobs:
|
||||
if-no-files-found: error
|
||||
overwrite: true
|
||||
|
||||
- name: Deny WebSearch and WebFetch after classification research
|
||||
if: steps.prepare.outputs.should_run == 'true'
|
||||
run: |
|
||||
# Research has finished. Block web tools for classify and later agents
|
||||
# that share this HOME / user-level cli-config.
|
||||
node -e '
|
||||
const fs = require("node:fs");
|
||||
const p = process.env.HOME + "/.cursor/cli-config.json";
|
||||
const c = JSON.parse(fs.readFileSync(p, "utf8"));
|
||||
c.permissions = {
|
||||
...(c.permissions || {}),
|
||||
deny: [...new Set([
|
||||
...(c.permissions?.deny || []),
|
||||
"WebSearch(*)",
|
||||
"WebFetch(*)",
|
||||
])],
|
||||
};
|
||||
fs.writeFileSync(p, JSON.stringify(c, null, 2) + "\n");
|
||||
'
|
||||
|
||||
- name: Classify with Cursor CLI
|
||||
if: steps.prepare.outputs.should_run == 'true'
|
||||
env:
|
||||
@@ -1087,19 +1101,13 @@ jobs:
|
||||
mkdir -p .cursor-runtime
|
||||
agent sandbox reset
|
||||
agent sandbox enable
|
||||
# Enable sandbox + block shell network only. Do NOT deny built-in
|
||||
# web tools yet — the isolated research pass must still call them.
|
||||
node -e '
|
||||
const fs = require("node:fs");
|
||||
const p = process.env.HOME + "/.cursor/cli-config.json";
|
||||
const c = JSON.parse(fs.readFileSync(p, "utf8"));
|
||||
c.sandbox = { ...(c.sandbox || {}), mode: "enabled", networkAccess: "user_config" };
|
||||
c.permissions = {
|
||||
...(c.permissions || {}),
|
||||
deny: [...new Set([
|
||||
...(c.permissions?.deny || []),
|
||||
"WebSearch(*)",
|
||||
"WebFetch(*)",
|
||||
])],
|
||||
};
|
||||
fs.writeFileSync(p, JSON.stringify(c, null, 2) + "\n");
|
||||
'
|
||||
agent sandbox run --sandbox bash -c 'touch .cursor-runtime/followup-sandbox-check'
|
||||
@@ -1181,6 +1189,26 @@ jobs:
|
||||
);
|
||||
'
|
||||
|
||||
- name: Deny WebSearch and WebFetch after follow-up research
|
||||
if: steps.prepare.outputs.should_run == 'true'
|
||||
run: |
|
||||
# Research has finished. Block web tools for the follow-up agent and
|
||||
# any later steps that share this HOME / user-level cli-config.
|
||||
node -e '
|
||||
const fs = require("node:fs");
|
||||
const p = process.env.HOME + "/.cursor/cli-config.json";
|
||||
const c = JSON.parse(fs.readFileSync(p, "utf8"));
|
||||
c.permissions = {
|
||||
...(c.permissions || {}),
|
||||
deny: [...new Set([
|
||||
...(c.permissions?.deny || []),
|
||||
"WebSearch(*)",
|
||||
"WebFetch(*)",
|
||||
])],
|
||||
};
|
||||
fs.writeFileSync(p, JSON.stringify(c, null, 2) + "\n");
|
||||
'
|
||||
|
||||
- name: Review follow-up with Cursor CLI
|
||||
if: steps.prepare.outputs.should_run == 'true'
|
||||
env:
|
||||
|
||||
Reference in new issue
Block a user