Skip to content

docs: align docs with code + alignment regression guard#3

Merged
ax128 merged 2 commits into
mainfrom
docs/align-with-code
Jun 13, 2026
Merged

docs: align docs with code + alignment regression guard#3
ax128 merged 2 commits into
mainfrom
docs/align-with-code

Conversation

@ax128

@ax128 ax128 commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • What changed? Fixes documentation claims that drifted from the actual code (found via a read-only doc↔code alignment audit), and adds a small regression test that pins the facts docs depend on.
  • Why? Following the docs verbatim could fail or mislead in two cases (compat port routing 403; an overstated "force-block" security guarantee), plus several precision/count drifts.
  • Intentional behavior change? No. Docs + one new test only; zero production code/behavior change.

Scope

  • Affected modules: docs only (README.md, README_zh.md, SKILL.md, config/README.md, OTHER_TERMINAL_CLIENTS_USAGE.md) + new test aegisgate/tests/test_doc_alignment.py + .gitignore whitelist.
  • Affected routes/endpoints: none (documentation of existing endpoints corrected).
  • Affected tenants/sessions/confirmation flow: none.

Security Impact

  • No security-impacting change
  • Security-impacting change

Security details

  • No code path changed. One doc fix removes an overstated guarantee: tool_call_injection is documented as default review (was wrongly listed as unconditional force-block). Behavior was already review in security_filters.yaml; only the doc now matches.

Confirmation Flow Changes

  • No confirmation flow change

RAG and Poisoning Controls

  • Not related to RAG/poisoning

Config and Compatibility

  • New env vars: none.
  • Updated defaults: none (docs now correctly state existing defaults: AEGIS_COMPAT_ALLOWED_PORTS empty=deny, AEGIS_V2_TARGET_ALLOWLIST empty=deny).
  • Backward compatibility impact: none.
  • Migration steps: none.

Testing

Targeted tests

  • Commands run: pytest aegisgate/tests/test_doc_alignment.py -q
  • Result: 3 passed.

Full test suite

  • Command run: pytest aegisgate/tests/ --collect-only -q (collection sanity; full run not executed in this session).
  • Result: 952 tests collected, no import/collection errors (949 prior + 3 new).
  • Known unrelated failures: pre-existing test_multipart_routes failures noted previously; untouched by this change.

Observability

  • Logs updated for key decisions/errors — N/A (no code change)
  • New/changed log keys: none.

Rollback Plan

  • How to rollback quickly: revert this PR (docs + one test file + .gitignore line).
  • Data/state cleanup: none.

Release Notes (copy-ready)

Docs: corrected security-pipeline order, compat port-routing prerequisite, tool_call_injection default disposition, and filter/pattern/config counts to match the code. Added a CI guard that keeps these doc facts aligned.

ax128 and others added 2 commits June 13, 2026 22:25
…jection, counts)

Fix documentation claims that drifted from the actual code, found via a
doc-vs-code alignment audit (read-only, evidence cross-checked):

- README/README_zh Security Pipeline: exact-value redaction runs before PII
  redaction and is the first response-side filter; note untrusted/system-prompt
  guards are constructed but not in the default policy.
- README_zh §2.3: compat port routing requires AEGIS_COMPAT_ALLOWED_PORTS
  (empty = fail-closed 403), matching the English README.
- README_zh §5.2: tool_call_injection default action is `review`, not an
  unconditional force-block (action_map.injection_detector.tool_call_injection).
- README_zh tool_call_guard wording: file-write tools skip only path-reference
  rules; bash/shell are dangerous-tool-name flagged (default review) and still
  fully scanned. Pattern counts corrected (~26 tool_call_injection, ~10 command).
- SKILL.md: v2 requires AEGIS_V2_TARGET_ALLOWLIST (empty = deny-all); register
  response example includes whitelist_key.
- config/README.md: system_prompt_guard is neither listed in default.yaml nor
  enabled by its flag (corrected the example).
- OTHER_TERMINAL_CLIENTS_USAGE.md: /v1/messages is native to the v1 adapter.

Docs only; no code or behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Pin the facts user-facing docs rely on so future drift fails CI instead of a
manual audit: concrete filter-class count (13), compat model whitelist appears
in both READMEs, and tool_call_injection default action stays `review`.

Track the new test via the .gitignore whitelist (aegisgate/tests/* is ignored).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ax128 ax128 merged commit d7aabe0 into main Jun 13, 2026
3 checks passed
@ax128 ax128 deleted the docs/align-with-code branch June 13, 2026 21:47
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.

1 participant