docs(adr): fix compliance rule precision in turn-boundary-batching#755
docs(adr): fix compliance rule precision in turn-boundary-batching#755masami-agent wants to merge 1 commit intoopenabdev:mainfrom
Conversation
- §6.4 Rule 1: add adapter-layer scope clarification caveat
(resolve_mentions() runs before {prompt} construction, not subject
to the rule — rule applies from Dispatcher::submit onward)
- §6.4 Rule 8: scope to retry-failed case only (first SendError
triggers transparent retry per §2.5; only failed retry surfaces
❌ + ⚠️ + Err)
- §3.2: mark slack_ts_to_iso8601 as (proposed helper)
- Metadata: reword self-reference for clarity
- §6.6: clarify threshold formula units (count × tokens > 500 tokens)
Closes openabdev#754
|
All PRs must reference a prior Discord discussion to ensure community alignment before implementation. Please edit the PR description to include a link like: This PR will be automatically closed in 3 days if the link is not added. |
OpenAB PR ScreeningThis is auto-generated by the OpenAB project-screening flow for context collection and reviewer handoff.
Screening report## IntentPR #755 tightens the wording in The operator-visible problem is ambiguity: the ADR currently overstates two requirements in ways that could mislead future implementers or reviewers. Specifically, it blurs adapter preprocessing versus broker prompt forwarding, and it implies every FeatThis is a docs improvement. Behaviorally, it does not change runtime code. It clarifies the documented contract for turn-boundary batching:
Who It ServesPrimary beneficiaries are maintainers and reviewers. Secondary beneficiaries are future agent implementers and runtime operators who need the ADR to describe the intended batching, retry, and dispatch behavior without creating false compliance failures. Rewritten PromptUpdate Clarify that the “broker forwards Also apply small documentation precision fixes: label Keep the change documentation-only, scoped to the ADR, and ensure the resulting text is internally consistent with the retry and batching design. Merge PitchThis is a low-risk documentation correction that prevents future implementation drift. It closes the gap between the ADR’s compliance language and the actual design reviewed in PR #598. The main reviewer concern is likely whether the revised wording accidentally weakens compliance requirements too much. Review should focus on whether the boundaries are precise: adapter preprocessing before prompt construction remains allowed, while broker/dispatcher mutation after prompt construction remains prohibited. Best-Practice ComparisonOpenClaw principles that are relevant:
Hermes Agent principles that are relevant:
The strongest best-practice alignment is precision around ownership boundaries. The ADR should make it clear which layer owns preprocessing, which layer owns dispatch, and when failures become user/operator-visible. Implementation OptionsConservative option: Merge the PR as a narrow ADR wording fix. This keeps the change documentation-only and accepts the current patch if the wording accurately reflects PR #598 review outcomes. Balanced option: Merge the wording fix, then open a follow-up issue to audit the implementation against the clarified rules. This preserves the low-risk docs correction while making sure the actual dispatcher, adapter, and retry behavior conform to the clarified ADR. Ambitious option: Convert the clarified ADR rules into explicit compliance tests or review checklist items. This would turn the ADR precision into enforceable guardrails, such as tests for retry-failed surfacing behavior and checks that prompt mutation does not occur after dispatcher submission. Comparison Table
RecommendationUse the balanced path. Advance PR #755 as a focused documentation correction, assuming the diff matches the stated scope, and create or link a follow-up implementation audit for the clarified adapter/dispatcher boundary and retry-failed That sequencing keeps this PR mergeable while preserving the deeper reliability question for Masami or Pahud follow-up. The current item should not expand into test or runtime changes unless review finds the ADR text still contradicts existing behavior. |
Summary
Fixes two precision issues in
docs/adr/turn-boundary-batching.mdidentified during PR #598 review but not resolved before merge.Changes
§6.4 Rule 1 — adapter-layer scope clarification
Added a caveat clarifying that Rule 1 (broker forwards
{prompt}verbatim) applies to the broker/dispatcher layer — i.e. fromDispatcher::submitonward. Adapter-level preprocessing that runs before{prompt}is constructed (e.g.resolve_mentions()indiscord.rs) is not subject to this rule.§6.4 Rule 8 — scope to retry-failed case only
Rule 8 previously stated that⚠️ +
SendErrormust surface immediately. However, §2.5 designs a retry-once path where the firstSendErrortriggers eviction + transparent re-send. Updated Rule 8 to explicitly state that only a failed retry surfaces ❌ +Err.Optional nits
slack_ts_to_iso8601as "(proposed helper)" since it does not exist yetp95_batch_size (count) × avg_tokens_per_event (tokens) > 500 tokensReferences
Closes #754