Repository navigation
feat: acp_rule on by default + /acp-rule remove/clear forwarding (#1399) - #1402
Conversation
诉求 1 — compress.rules defaults ON (owner decision: the model owns session rules):
- rulesEnabled(): absent block now means enabled; only explicit false disables
- new effectiveRulesEnabled() for the session-level plugin-tool paths
(loop/core executeProxyTool, absorb isProxyToolFor, plugin tool allowlist)
- kernel needs no change: acp_rule is unconditionally protected there
诉求 2 — human-side parity: pi/omp /acp-rule now forwards the full op set:
- bare = list, text = record (unchanged)
- 'remove <id>' -> { delete: id }; bare 'remove' warns with usage, no forward
- bare 'clear' -> { clear: true }; 'clear <text>' records (typo guard)
Docs en+zh: rules default line + migration note, /acp-rule usage incl.
remove/clear, stale '#1178' claim removed. Tests: default-on expectations
flipped at every gate site, new forwarding/regression cases, wire-contract
ledger + manifest-default golden regenerated via scripts/update-wire-contract-goldens.ts.
📦 Built Package ArtifactBranch: Option A — Install from npm PR tag (recommended)npm install -g billion-context@pr-1402Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pr1402.tgz
npm install -g packageInstall instructions are refreshed on each push. |
[bot] 🏷 Reviewed PR #1402 end-to-end (full diff, every gate site, test assertions, CI). Verdict: mergeable — recommend owner merge. ① Original issue direction (#1399)
② Regression audit (pre-existing behaviors touched)
No unintended regressions found. ③ Code review
④ Tests
⑤ Diff cleanliness22 files, +343/−91, every file on-purpose (rules-feature, config comment, 3 gate consumers, pi agent, 5 docs en/zh, 10 test files incl. 1 golden). No unrelated changes, no whitespace churn, no package.json/lockfile churn (kernel pin untouched → no cross-repo dependency). Evidence
中文摘要:审核了 #1402 —— 把 |
…injection Owner decision on #1402: the #1399 'model has full rights over session rules' ruling covers the CAPABILITY (record/list/delete/clear, unprompted use allowed) within sessions where the feature is enabled — it does not inject the tool for everyone. Revert rulesEnabled/effectiveRulesEnabled to explicit-enable (=== true), flip every default-on assertion back (rules/manifest/mcp-shell/wire-contract/codex-official), regenerate the default golden manifest without acp_rule, and update README/CONFIGURATION (en+zh) + PLUGIN.md wording.
|
Owner 裁决落地(head 改动:
门禁:定向 134/134 + typecheck 0 错(全量远程 CI)。 保留不变:CRUD 全能力面(delete/clear + |
The pivot commit rewrote the Description lines of the compress.rules entry but left the Default line as 'true (since #1399; previously false)' in CONFIGURATION.md / CONFIGURATION.zh-CN.md — self-contradictory with the 'off by default' description directly below. Restored to the pre-PR value 'false'.
…te (#1399 pivot) v1 pinned 'rules: false' with a comment claiming '#1399 made it default-on'; after the pivot acp_rule is opt-in again, so the pin is redundant (absent == false, verified via compress-settings.ts mapping) and the rationale comment describes a world that no longer exists. Restored master's original comment block + config object; file is now byte-identical to master. Targeted rules suites: 134/134 pass.
[bot] 🏷 Round-2 review of the pivot commit What I verified in
|
Closes #1399
Behavior changes (flagged per owner policy)
compress.rulesdefault:false→true(诉求 1). The persistent-rules feature (acp_rule) was pure opt-in; an absent config block now means enabled, and only an explicitcompress.rules: falseat any level disables it. Rationale: owner decision that the model owns session rules — most users never found the opt-in switch, so the feature effectively did not exist. Risk is minimal: the tool description is self-contained, there is zero system-prompt cost, and rules are hard-protected across compression (an ACP selling point). Migration: users who relied on off-by-default should setcompress.rules: false./acp-rulecommand surface expanded (诉求 2): pi/omp lanes previously could only list/record. Nowremove <id>forwards{delete}and bareclearforwards{clear:true}to the sameexecuteRulepath as the model's tool; bareremovewarns with usage instead of forwarding;clear <text>records text instead of wiping (typo guard). Humans now have full parity with the model side (fixes the inversion vs billion-context-pi's native adapter).Changes
src/rules-feature.ts:rulesEnabled()=config.rules?.enabled ?? true; neweffectiveRulesEnabled(session, fallback)for session-level pathsexecuteProxyTool(src/loop/core.ts),isProxyToolFor(src/absorb.ts), plugin-tool allowlist (src/plugin.ts), manifest advertisement (viarulesEnabled). Kernel needs no change —acp_ruleis unconditionally protected there.src/agent/pi.ts:/acp-rulesubcommand parsing + description update/acp-ruleusage incl. remove/clear, stale "feat: acp_rule delete/clear — wire kernel removeRule/clearRules (#1177) #1178" claim removedpreflight-compress.test.tspinrules: falsefollowing the file's own CCR precedent (the new ~300-token schema would shift those fold boundaries)tests/golden/wire-contract/manifest-default.jsonregenerated viascripts/update-wire-contract-goldens.ts(required by the §7.3 wire-constraint-ledger rule — the default surface now advertisesacp_rule); kernel/bili/optin goldens byte-identical after regenPre-flight
E2E_CHECK=1) ✅; the fullACP_TEST_E2E=1run could not complete locally because this environment's local upstream endpoint was refusing TCP connections (transient environment issue, unrelated to the diff — the proxy itself returned its structured 502 diagnostics correctly). The repo's ci-e2e workflow auto-runs the suite against this PR (diff touches src/loop/** and src/agent/**).