fix(jangar): preserve revenue repair topline fallback#6728
Open
gregkonush wants to merge 1 commit into
Open
Conversation
Member
Author
|
Status: PR #6728 is green and mergeable. What changed:
Evidence:
PR: #6728 |
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.
Summary
/trading/revenue-repairsource-of-truth fallback when Jangar consumer evidence summary is unavailable or route-missing.business_state,revenue_ready, repair queue head, max notional, and settlement conveyor evidence for/ready.queue_head_inferredinstead of a missing topline./readyregressions for the consumer-evidence transport drop case.Related Issues
None.
Requirement provenance: NATS
generalruntime objective forjangar-control-planeon 2026-05-15.Design provenance:
docs/agents/designs/206-jangar-material-evidence-settlement-spine-and-repair-dispatch-budget-2026-05-14.mddocs/agents/designs/200-jangar-revenue-repair-settlement-conveyor-and-stage-health-custody-2026-05-14.mdTesting
bun install --frozen-lockfile --ignore-scripts: passbunx oxfmt --check services/jangar/src/server/control-plane-torghut-consumer-evidence.ts services/jangar/src/server/control-plane-torghut-revenue-repair-fallback.ts services/jangar/src/server/control-plane-material-evidence-settlement.ts services/jangar/src/server/__tests__/control-plane-torghut-consumer-evidence.test.ts services/jangar/src/routes/ready.test.ts: passcd services/jangar && bunx vitest run --config vitest.config.ts src/server/__tests__/control-plane-torghut-consumer-evidence.test.ts -t "source-of-truth topline": passcd services/jangar && bunx vitest run --config vitest.config.ts src/routes/ready.test.ts -t "revenue topline": passcd services/jangar && bunx vitest run --config vitest.config.ts src/server/__tests__/control-plane-torghut-consumer-evidence.test.ts src/routes/ready.test.ts: passcd services/jangar && bunx vitest run --config vitest.config.ts: pass, 1259 testsbun run --filter @proompteng/otel build: passbun run --filter @proompteng/temporal-bun-sdk build: passbun run --filter @proompteng/jangar tsc: passbun run --filter @proompteng/jangar build: passbun run --filter @proompteng/jangar docs:inventory:check: passbun run --filter @proompteng/jangar check:module-sizes: passbun run --filter @proompteng/jangar lint:oxlint: pass with existing warnings and zero errorsbun run --filter @proompteng/jangar lint:oxlint:type: pass with existing warnings and zero errorsgit diff --check: passgit diff -- bun.lock --exit-code: passagents-ci / validate: pass, 50sagents-ci / integration: pass, 11m57sjangar-ci / lint-and-typecheck / run: pass, 2m23sCI / check_changed_files: pass, 6sSemantic Commits / Lint commit messages: pass, 21sSemantic Pull Request / Validate PR title: pass, 3sScreenshots (if applicable)
N/A. Runtime API behavior only.
Breaking Changes
None.
Checklist
Runtime Evidence
Before live Jangar
/readysample on 2026-05-15:business_state:nullrevenue_ready:nullrepair_queue_len:0top_repair_queue_item:nullrevenue_custody:nullmaterial_evidence_settlement:nullTorghut source-of-truth
/trading/revenue-repairsample from the same run:business_state:repair_onlyrevenue_ready:falserepair_queue_len:5repair_alpha_readinessrouteable_candidate_countmax_notional:0alpha_readiness_settlement_conveyor.status:no_deltaAfter source-level validation:
/readypreservesbusiness_state=repair_only,revenue_ready=false, top itemrepair_alpha_readiness, affected value gaterouteable_candidate_count, andmax_notional=0when the consumer evidence summary transport is unavailable.consumer_evidence_status=unavailable,revenue_repair_topline_status=queue_head_inferred, andtopline_inferred_from_queue_headwhile avoiding falsebusiness_state_missingandrevenue_repair_top_item_missinggaps.Risk And Rollback
Risk: fallback topline could hide consumer evidence transport failure. Mitigation: the consumer evidence status and negative evidence remain
unavailableorroute_missing; this only carries the revenue-repair source-of-truth topline for readiness truth.Risk: malformed fallback payload. Mitigation: existing revenue-repair readers normalize fields and contract mismatch helpers still report typed schema debt.
Rollback: revert this PR. That restores the previous behavior where unavailable consumer evidence removes the Jangar
/readyrevenue-repair topline.Capital safety: unchanged. The fallback keeps
repair_only,revenue_ready=false, andmax_notional=0visible and does not enable live submission.Release Note
Jangar
/readynow preserves Torghut revenue-repair topline evidence from the source-of-truth endpoint during consumer evidence transport drops. This improvesready_status_truthand reduces false failed AgentRun classification while keeping the real transport debt visible for rollout follow-up.