A baseline can deduplicate identical harness/shared instructions before the byte renderer omits their retained winner. Removing every deduplicated scope from excludedScopes then made the shared copy eligible on the next unchanged step. It injected the broader instructions the baseline had deliberately omitted, contradicting the retained-baseline budget policy. Project sibling copies had the same problem. Allow a duplicate to leave the exclusion set only when the included baseline contains its candidate group and trimmed digest. Match the digest as well as the group: a different sibling may fit the budget while the duplicate's winner does not. Use the included files' original content so truncated and empty represented winners retain their ordinary duplicate-promotion behavior. Copies of omitted content inherit that omission for the visible baseline. Duplicates of represented content remain probed and can be promoted when their winner changes or disappears. Keep both README languages, the existing shared root decision, and the local result-field documentation consistent with this rule. No durable event fields or baseline identities change. Add plugin regressions for identical global copies across repeated steps and resumes, and an omitted project digest with a different retained sibling. Add an authored recorded-session scenario that runs the shipped headless profile with identical 1900-byte global files and a 700-byte budget: its two model requests retain one project-only baseline and never inject the shared copy. Validation: - Both new plugin regressions failed on the reviewed implementation with two contexts instead of one, then passed with the fix. - pnpm exec vitest run packages/context/agent-instructions/tests/agent-instructions.spec.ts -t 'duplicate budget-omitted|different digest fits|content-deduplicated shared|changed shared file': 4 passed. - pnpm run test:snapshot:refresh snapshots/session/headless.snapshot.ts -t agent-instructions-budget: passed. - pnpm run test:snapshot snapshots/session/headless.snapshot.ts -t agent-instructions-budget: passed. - Reverting only src/index.ts to the reviewed head makes that snapshot fail with an extra agents-global set and 304 bytes of omitted global content. - pnpm run test:snapshot scripts/session-snapshot-corpus.corpus.ts: 3 passed. - Scoped bilingual pairing was rerecorded and verified; git diff --check passed.
20 lines
1.0 KiB
YAML
20 lines
1.0 KiB
YAML
# Bilingual-pair consistency record for 2026-10-05-shared-agents-root-instructions.md (docs/i18n/README.md): per heading
|
|
# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
|
|
# After editing either side, bring the other along and re-record with:
|
|
# pnpm run verify-translation-pairing --write .agents/notes/implemented/architecture/2026-10-05-shared-agents-root-instructions.md
|
|
/agent-note-shared-agents-root-joins-the-user-global-instruction-chain:
|
|
en: d29282678b243512
|
|
zh: f81e134f59df5491
|
|
/agent-note-shared-agents-root-joins-the-user-global-instruction-chain/problem:
|
|
en: 8fd7583122a2b082
|
|
zh: 032acf0c713780f7
|
|
/agent-note-shared-agents-root-joins-the-user-global-instruction-chain/decision:
|
|
en: 69008d5fd1bb091b
|
|
zh: a7c4d0334834e6c7
|
|
/agent-note-shared-agents-root-joins-the-user-global-instruction-chain/alternatives-considered:
|
|
en: 825c2470ba83573e
|
|
zh: d0ffd4fea4f8f0d0
|
|
/agent-note-shared-agents-root-joins-the-user-global-instruction-chain/consequences:
|
|
en: cc30674b9b41d0f3
|
|
zh: 36ac52fb078dbec4
|