feat(rendering): ZADC-001A3B1 — Hermes Agent Renderer - #12
Draft
ezutfen wants to merge 4 commits into
Draft
Conversation
…dary ZADC-001A3B1: Add a deterministic Hermes-specific Markdown renderer on the existing A3A rendering foundation. HermesRenderer (consumer='hermes', media_type='text/markdown', renderer_id='zadc-hermes-markdown', renderer_version='0.1.0') gives Hermes an explicit instruction-versus-data boundary: - Packet artifacts render a HERMES EXECUTION CONTRACT section identifying the sealed contract as the only potentially executable source content. The contract is presented in deterministic sections, each carrying its source payload as lossless canonical JSON in a dynamically-fenced block. - Every non-Packet artifact renders a NON-EXECUTABLE SOURCE CONTEXT section with artifact-specific classification labels. - Every view begins with a prominent NON-AUTHORITATIVE notice and includes the complete canonical source JSON in a lossless source-record block. HermesRenderer is a frozen slotted dataclass with fixed init=False identity fields, registered in DEFAULT_RENDERER_REGISTRY alongside human and ci. Codex and Claude remain unregistered.
Add tests/test_a3b1_rendering.py covering fixed identity, registry integration, non-authoritative boundary, instruction-versus-data separation, non-Packet classifications, adversarial instruction-boundary tests, 8 Hermes golden digests, and determinism/semantic preservation through both HermesRenderer.render_content and the public render_artifact entrypoint. Update existing tests: A3A registry count (now 3), guard tests (HermesRenderer permitted, Codex/Claude absent), A3A package smoke (hermes rendering + codex reserved check), API evidence guard, and regression guard.
…ADME Add docs/api-a3b1-hermes-renderer.md documenting fixed identity, registry integration, output structure, instruction-versus-data rules, Packet treatment, non-Packet classifications, adversarial limitations, and examples. Update docs/roadmap.md: mark A3A complete, add A3B1 as current, identify A3B2 (Codex) as next. Update README.md with HermesRenderer mention and a minimal Hermes rendering example.
Python 3.11/3.12 raises TypeError instead of AttributeError for slot violation writes on frozen slotted dataclasses. Accept both exceptions to match the existing A3A test convention.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Packet
Work-start authorization
bcec659cb629030099be483e2a31a147b3bb40a7bcec659cb629030099be483e2a31a147b3bb40a723fde1c530d7d6ad3940a9f33242280d95c0eef2Commits
0edb82c—feat(rendering): add HermesRenderer with instruction-versus-data boundary75c7256—test(rendering): add A3B1 Hermes renderer tests and update guard tests23fde1c—docs(rendering): add A3B1 Hermes renderer docs, update roadmap and READMEFiles changed
src/zadc/rendering/hermes.pyHermesRendererdataclasssrc/zadc/rendering/registry.pyHermesRendererinDEFAULT_RENDERER_REGISTRYsrc/zadc/rendering/__init__.pyHermesRenderersrc/zadc/__init__.pyHermesRendererfrom top-leveltests/test_a3b1_rendering.pytests/test_a3a_rendering.pytests/test_a3a_package_smoke.pytests/test_fix2_bp09_api_evidence.pyHermesRenderertests/test_fix3_bp08_09_regression.pyHermesRendererdocs/api-a3b1-hermes-renderer.mddocs/roadmap.mdREADME.mdHermes renderer identity
hermestext/markdownzadc-hermes-markdown0.1.0HermesRendereris a frozen, slotted dataclass with fixedinit=Falseidentity fields. The constructor takes no arguments.Default registry inventory
DEFAULT_RENDERER_REGISTRYcontains exactly three renderers in deterministic registration order:human→HumanMarkdownRenderer(zadc-human-markdown @ 0.1.0)ci→CiJsonRenderer(zadc-ci-json @ 0.1.0)hermes→HermesRenderer(zadc-hermes-markdown @ 0.1.0)codexandclauderemain unregistered and continue to raiseRendererNotFoundError.Packet instruction-boundary behavior
A
Packetrenders aHERMES EXECUTION CONTRACTsection:Non-Packet classification behavior
Adversarial test inventory
Hermes golden inventory (8 digests)
881e7ffd7894776a61ea95752e7339ce65654a85cf146e526438c0bce00083b5e36c90808632429ea1311cf1772604f306c148e70b8fc97bb714f1dacec2f79fa16a669c2fee55185346cbf27dcf1a047b233596076480d5598bc0f12df63f0ed813a85f02388c31358e9ca3ae48d83ab1e3f7340fa3c1e1cd6814fe24802285e9c4d8962e66674f52247eb3edba317ca0523917a9ebc870ade5a2b0cdb313f5e23fad546fb5bb4dafd7a8fe3bd59cf7bca1556e397ebd3a7c24b6d63538da6625ac574a68919cd9cda839656ff8206e47165e92529ead632c565d49b182094da24ab80acf8d2a621e9cbb73b2b83711ef88a805a20f4dc95265221360965b3fExisting golden stability
All 16 existing human and CI golden digests remain unchanged (verified by
test_hermes_does_not_change_human_or_ci_goldensand the unchangedGOLDEN_CONTENT_DIGESTSintest_a3a_rendering.py).Schema stability
All 11 schemas regenerate byte-identically (
git diff --exit-code -- schemas/0.1passes). No schema changes required becausehermesalready exists inRenderConsumer.Tests and coverage
Local verification
All local checks pass:
uv lock --check✓uv sync --frozen --extra dev✓uv run python scripts/export_schemas.py+git diff --exit-code -- schemas/0.1✓make check(ruff format + ruff check + mypy --strict + pytest) ✓make workflow-lint(actionlint + zizmor) ✓make build✓make package-smoke✓Clean-wheel verification
make package-smokebuilds a wheel, installs it in a clean venv, and successfully:HermesRendererfromzadcconsumer='hermes'DEFAULT_RENDERER_REGISTRY.consumers == {'human', 'ci', 'hermes'}codexraisesRendererNotFoundErrorScope deviations
None. All work is within
allowed_paths(src/zadc/rendering/**,src/zadc/__init__.py,tests/**,docs/**,README.md). No dependencies, lockfiles, workflows, canonical artifact models, canonical serialization, or digest behavior were modified.A3B2 and A3B3 exclusions
This slice explicitly excludes:
codexremains unregisteredclauderemains unregisteredStatus
Awaiting exact-head hosted CI and CodeQL results before recommending GREEN_FOR_REVIEW.