docs: describe the shape and what enforces each boundary - #23
Merged
Merged
Conversation
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.
The third of the three submission deliverables — public repo, pitch video,
architecture doc. Everything it describes now exists, which is why it was worth
waiting to write.
Deliberately narrow, because three documents already exist and overlapping them
would make all four worse. README has the result. DECISIONS has the alternatives
that were rejected. FAILURES has the ten things this got wrong. ARCHITECTURE has
the shape.
What it contains
The dependency graph, one diagram.
worldknows nothing aboutagent;agentknows nothing about
world;evalandwebknow about both and neither knowsabout them.
One payment, end to end — as a Mermaid sequence diagram across all eight
participants, from webhook to
RECOVERED | STOPPED. Every arrow is a function calla reader can follow.
Four boundaries, each with the mechanism that enforces it. This is the section
that earns the document. An architecture doc that lists boundaries is describing
intentions, so each one names what makes it true and the test that fails if it is
removed:
recoup/agent/**, in CIa live key
with load-time validation of every config key that names something in code
deterministic behaviour
The ledger as the spine, including the actual DDL — two triggers, two indexes —
and what is deliberately not stored: three fields removed after measuring that
they were ~45% of the file.
A degradation table. Eight rows: no key, no key and no cache, provider 5xx,
malformed output, no run, no cache dir, no Razorpay key, a live key. The
through-line is that nothing in the recovery path may depend on a network service
being reachable.
Where to start reading — a table mapping "if you want to check X" to the file
that answers it, ending with
python -m recoup reproduce.Verified rather than remembered
Every factual claim was checked against the code before committing, not written
from memory:
git ls-filesMAX_DECISIONS_PER_PAYMENT = 12imported and printedPaymentsAdapterandNotifierrzp_live_key raisesTestModeViolationconfirming it parses and lays out with all eight participants, rather than
assuming the syntax was right
That last one caught nothing, but "the architecture doc has a broken diagram at the
top" is a bad way to open a submission.
Also
README said FAILURES had "eight things", stale since two entries were added. Now ten,
and ARCHITECTURE is linked from the reading list.
Verification
pytest— 487 passed.ruff check .clean. No code changed.