Skip to content

docs(context): correct Source, Order Id, Instrument wire semantics#54

Merged
NotAProfDev merged 1 commit into
mainfrom
docs/context-wire-semantics
Jun 28, 2026
Merged

docs(context): correct Source, Order Id, Instrument wire semantics#54
NotAProfDev merged 1 commit into
mainfrom
docs/context-wire-semantics

Conversation

@NotAProfDev

@NotAProfDev NotAProfDev commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Summary

Aligns the CONTEXT.md glossary with the model's actual wire/distribution semantics,
surfaced during a /grill-with-docs session on oath-model. Glossary-only; no code.

  • Source — sharpened to operator-assigned, connection-independent (one venue =
    one Source; redundancy/failover stays internal to the adapter). Required for stable
    Account identity — a per-connection Source would split one broker account into two
    identities and double-count Positions.
  • Order Id — removed "never sent on the wire". It is never rendered to a
    venue id (no broker sees it), but it does travel OATH's Bus: it anchors the
    Domain Event audit narrative and the order views a Frontend tracks.
  • Instrument — removed "never travels on the wire or the Event Log". The
    record is distributed to consumers that need precision; fold-relevant attributes
    (e.g. multiplier) are logged Core inputs so Replay reproduces P&L, while
    display-only attributes (the Symbol ticker) refresh off-log.

These overclaims contradicted ADR-0026 (carries order_id in the OrderInstruction
Bus message) and ADR-0025 §5 (logs fold-relevant instrument metadata), and would
mislead implementation of the oath-model wire types.

Test plan

  • just ci green locally via the pre-push hook: fmt, typos, clippy, test, doc, machete,
    gitleaks, actionlint, shellcheck.
  • Glossary-only change; no behavioral impact.

Closes #53

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Clarified glossary terms around source identity, instrument data, and order IDs.
    • Improved explanations of how market-data routing, reference data, and precision semantics are distinguished.
    • Updated wording to make lifecycle behavior and audit tracking of order identifiers easier to understand.

Sharpen Source to operator-assigned and connection-independent; remove the "never on the wire" overclaims from Order Id and Instrument. Order Id travels OATH's Bus (Domain Events / frontend) but is never rendered to a venue id; the Instrument record is distributed to consumers, with fold-relevant attributes logged so Replay reproduces P&L. Aligns the glossary with ADR-0025 §5, ADR-0026, and ADR-0028.

Closes #53

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@NotAProfDev NotAProfDev added the documentation Improvements or additions to documentation label Jun 28, 2026
@coderabbitai

coderabbitai Bot commented Jun 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1f76eae9-6dcc-472f-b78b-11d2cd70847f

📥 Commits

Reviewing files that changed from the base of the PR and between 85c79e3 and 3fa79cc.

📒 Files selected for processing (1)
  • CONTEXT.md

📝 Walkthrough

Walkthrough

Three glossary entries in CONTEXT.md are rewritten: Source clarifies operator-assigned, connection-independent identity and its role in account composition; Instrument clarifies reference-data resolution at the boundary, logged vs. display-only attributes, and distribution behavior; Order Id corrects that it travels OATH's Bus (but never to a venue), anchoring Domain Events and Frontend views.

CONTEXT.md Glossary Alignment

Layer / File(s) Summary
Source and Instrument definitions
CONTEXT.md
Source is redefined as operator-assigned, connection-independent feed identity whose stability is required for account identity composition and Position accounting. Instrument is redefined to describe resolution at the boundary from Source symbology, distribution of precision, and the split between logged fold-relevant attributes and display-only attributes that refresh without logging.
Order Id definition
CONTEXT.md
Order Id definition is expanded to distinguish "never rendered to a venue id" from "does travel on OATH's Bus," specifying its role anchoring Domain Event audit narrative and Frontend order views, while venue identification uses per-instruction ids and broker-assigned order ids.

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • NotAProfDev/oath#47: Directly overlaps with the clarified Order Id definition and its lifecycle/event-routing semantics, as that PR establishes the three-id order identity model (Order Id / Order Instruction Id / Broker Order Id) in the glossary and ADRs.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses Conventional Commits with a clear docs(context) scope and accurately summarizes the glossary semantics update.
Linked Issues check ✅ Passed The glossary-only edits align with #53 by clarifying Source, Order Id, and Instrument wire and distribution semantics as requested.
Out of Scope Changes check ✅ Passed The PR appears scoped to CONTEXT.md glossary updates and introduces no unrelated code or behavioral changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/context-wire-semantics

Comment @coderabbitai help to get the list of available commands.

@NotAProfDev NotAProfDev merged commit 42a8771 into main Jun 28, 2026
5 checks passed
@NotAProfDev NotAProfDev deleted the docs/context-wire-semantics branch June 28, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(context): align glossary with actual wire/distribution semantics (Source, Order Id, Instrument)

1 participant