Skip to content

docs(how-to): add backend authoring guide#155

Merged
Alberto-Codes merged 3 commits into
mainfrom
feat/docs-4-5-backend-authoring-guide
Mar 29, 2026
Merged

docs(how-to): add backend authoring guide#155
Alberto-Codes merged 3 commits into
mainfrom
feat/docs-4-5-backend-authoring-guide

Conversation

@Alberto-Codes
Copy link
Copy Markdown
Owner

Backend authors (Epic 5 dev agents and community contributors) had no
documentation for implementing custom encryption backends. They had to
read library source code to understand the EncryptionBackend protocol,
registration, and testing patterns.

  • Add docs/how-to/backend-authoring.md with 10 sections: protocol
    contract, backend ID assignment, AesGcmBackend walkthrough, starter
    template, registration instructions, testing checklist, common
    pitfalls, security notes, and related links
  • Add Backend Authoring nav entry under How-To Guides in mkdocs.yml
  • Add TestAllAlphabeticallySorted parametrized test covering all 3
    __init__.py files (cross-cutting); fix root __all__ sort order
  • Fix starter template sync_decrypt error-wrapping anti-pattern and
    missing ConfigurationError import (code review)

Test: pre-commit run --all-files && uv run mkdocs build --strict


PR Review

Checklist

  • Self-reviewed my code
  • Tests pass (uv run pytest)
  • Lint passes (uv run ruff check .)
  • Breaking changes use ! in title and BREAKING CHANGE: in body

Review Focus

  • Starter template correctness (sync_decrypt pattern, imports)
  • Testing checklist source references accuracy
  • AesGcmBackend walkthrough excerpts match actual source

Related

  • Story 4.5 (FR50): Backend Authoring Documentation
  • Serves Epic 5 (AWS KMS, GCP Cloud KMS, HashiCorp Vault backends)

Add comprehensive Backend Authoring Guide covering the EncryptionBackend
protocol contract, backend ID assignment, AesGcmBackend walkthrough,
starter template, registration, testing checklist, common pitfalls, and
security notes. Fix __all__ sort order in root __init__.py and add
parametrized test enforcing alphabetical sort across all __init__.py files.
Code review found the starter template's sync_decrypt used except Exception
which caught the NotImplementedError placeholder, and ConfigurationError was
referenced in comments but not imported. Also improved test checklist
specificity and corrected cross-cutting task bookkeeping.
@Alberto-Codes Alberto-Codes marked this pull request as ready for review March 29, 2026 02:56
Copilot AI review requested due to automatic review settings March 29, 2026 02:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “Backend Authoring” how-to guide to help contributors implement custom EncryptionBackend implementations without reading library internals, and tightens public API hygiene with a new __all__ ordering test.

Changes:

  • Added docs/how-to/backend-authoring.md with protocol contract, backend ID guidance, registration steps, testing checklist, pitfalls, and security notes.
  • Updated mkdocs.yml to include “Backend Authoring” under How-To Guides.
  • Added a unit test to enforce alphabetical __all__ ordering across package __init__.py modules and fixed root __all__ ordering.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/unit/test_public_api.py Adds a parametrized test enforcing sorted __all__ in key package modules.
src/adk_secure_sessions/init.py Reorders __all__ entries to satisfy alphabetical ordering.
mkdocs.yml Adds the new Backend Authoring page to the docs navigation.
docs/how-to/backend-authoring.md New backend authoring guide covering implementation, registration, and testing guidance.
_bmad-output/test-artifacts/test-review.md Updates the generated test review artifact metadata/content for a newer review run.
_bmad-output/implementation-artifacts/sprint-status.yaml Marks stories 4.4 and 4.5 as done.
_bmad-output/implementation-artifacts/4-5-backend-authoring-documentation.md Adds story artifact write-up, but contains scope statements that contradict this PR’s actual changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread _bmad-output/implementation-artifacts/4-5-backend-authoring-documentation.md Outdated
Cross-cutting task added __init__.py sort fix and test_public_api.py
test, but Dev Notes still said "no src/ changes". Added cross-cutting
acknowledgment and removed __init__.py from the "no changes" list.
@Alberto-Codes Alberto-Codes merged commit 556d992 into main Mar 29, 2026
9 checks passed
@Alberto-Codes Alberto-Codes deleted the feat/docs-4-5-backend-authoring-guide branch March 29, 2026 03:08
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.

2 participants