Skip to content

fix(agent): deduplicate instruction loading and gate writes - #533

Merged
ss-o merged 1 commit into
mainfrom
bug-532
Aug 21, 2026
Merged

fix(agent): deduplicate instruction loading and gate writes#533
ss-o merged 1 commit into
mainfrom
bug-532

Conversation

@ss-o

@ss-o ss-o commented Aug 21, 2026

Copy link
Copy Markdown
Member

Summary

  • Treat byte-exact instruction content already present in an active context as loaded.
  • Require explicit external-write authority for issues, comments, pull requests, and tracker records.
  • Add contract coverage for both policy guarantees.

Closes #532

Instruction impact review

  1. Classification: shared organization policy, handoff procedure, and executable contract assertions.
  2. Consumers: Codex, Claude Code, Copilot, Gemini CLI, humans, and repositories importing the public baseline.
  3. Canonical ownership: AGENTS.md remains the shared owner; .github/AGENT_MEMORY.md remains the handoff owner.
  4. Duplication: no new policy owner is introduced. The associated zsh-eza change removes duplicated adapter prose.
  5. Routing: the public manifest needs no route change. The private route guard is handled in the separate private integration.
  6. Delivery: mandatory rules remain available through public AGENTS.md without an optional hook or skill.
  7. Validation: the public validator and 75 tests pass. The generated private composite is validated separately and remains below its size limit. Manual runtime discovery is unverified.

Verification

  • python3 scripts/validate-agent-policy.py --root .
  • python3 -m unittest discover -s scripts -p test_validate_agent_policy.py -q
  • git diff --check

Agent handoff

Status: Ready for review
Repository: z-shell/.github
Branch/PR: bug-532
Tracker/Issue: #532

Current state

  • The policy, memory protocol, and contract tests are committed and published.

Verification

  • Public validator: passed.
  • Public unit suite: 75 tests passed.
  • Diff check: passed.

Blockers

  • None.

Next steps

  1. Review and merge this PR.
  2. Pin the merged public commit in the private meta-workspace and regenerate its composite.

@ss-o
ss-o marked this pull request as ready for review August 21, 2026 02:48
@ss-o
ss-o requested a review from a team as a code owner August 21, 2026 02:48
@ss-o
ss-o merged commit e0e5064 into main Aug 21, 2026
7 checks passed
@ss-o
ss-o deleted the bug-532 branch August 21, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(agent): deduplicate instruction loading and gate external writes

1 participant