feat(ui): add map-context to Evidence Drawer admission - #2105
Draft
bartytime4life wants to merge 3 commits into
Draft
feat(ui): add map-context to Evidence Drawer admission#2105bartytime4life wants to merge 3 commits into
bartytime4life wants to merge 3 commits into
Conversation
Add a deterministic candidate-only anticorruption adapter between the existing renderer-neutral MapContextEnvelope and public-safe EvidenceDrawerPayload profiles. Emit the existing DecisionEnvelope shape with selected-feature evidence binding, context expiry, safe finite outcomes, no-leak behavior, exact fixtures, tests, read-only CI, architecture notes, and generated provenance. This creates no evidence, policy, review, release, publication, or public-use authority.
Synchronize the candidate-only MapContextEnvelope to EvidenceDrawerPayload admission packet with main after independently merged review-authority, DecisionEnvelope-validation, and adjacent governance/domain slices. Intervening paths were inspected and are disjoint. The resulting tree retains current main plus only the intended 12-path adapter delta. No force push, release, publication, or authority transition is performed.
4 tasks
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.
Goal
Add a deterministic, candidate-only anticorruption adapter between the existing renderer-neutral
MapContextEnvelopeand public-safeEvidenceDrawerPayloadprofiles. The adapter checks selected-feature, release, evidence, caller-role, freshness, and finite-outcome alignment, then emits the existingDecisionEnvelopeshape.It does not resolve evidence, evaluate policy, authenticate review, establish release state, authorize public use, invoke a deployed route, or publish anything.
Exact state
main@8ee05f3738c29344d055025bf47448150429e05e2b6f3dcf9a4642f23055ef8c8e2a0eb785d31eadWhy this closes a real dependency gap
Current
mainalready contains:MapContextEnvelopecontract and validator;EvidenceDrawerPayloadcontract and validator;packages/envelopeshelper package;DecisionEnvelopeschema and semantic validator;What was missing was a deterministic cross-object admission boundary. Without it, an individually valid drawer payload could cite evidence visible elsewhere in the viewport but unrelated to the selected feature, or propagate stale/denied/error state without a reviewed finite candidate outcome.
Object-family boundary
No new contract or schema authority is created.
MapContextEnvelopeEvidenceDrawerPayloadDecisionEnvelopeThe adapter is an anticorruption layer between bounded contexts, not a fourth sovereign object.
Admission behavior
The helper checks only explicit local declarations and relationships:
assembled_at <= evaluated_at <= expires_at; expiry returnsABSTAIN.false.SYSTEM_TESTis denied unless explicitly admitted for fixture-only execution.ABSTAIN.PUBLISHED, and its release ref belongs to the context release set.ANSWERandABSTAINdrawer evidence is a subset of the selected feature evidence, not merely another visible layer's evidence.DENYandERRORcandidates carry no evidence refs, citations, history, title, summary, URL, limitation, or source text.The emitted candidate uses
policy_family = "render", matchingdecision/outcome, fixed safe obligations, and version1.0.0.Finite outcomes
ANSWERSUPPORTEDABSTAINSTALE_EVIDENCE,CONTEXT_EXPIRED,SELECTION_REQUIRED,SELECTION_AMBIGUOUSDENYSENSITIVE_DETAIL_RESTRICTED,CALLER_ROLE_DENIEDERRORUPSTREAM_ERROR,DRAWER_EVIDENCE_OUTSIDE_SELECTION,DRAWER_TRUST_STATE_MISMATCHChanged paths
.github/workflows/map-context-evidence-drawer-admission.ymldata/receipts/generated/genrec-map-context-evidence-drawer-admission-20260807.jsondocs/architecture/ui/map-context-evidence-drawer-admission.mdfixtures/ui/map_context_evidence_drawer_admission/README.mdfixtures/ui/map_context_evidence_drawer_admission/cases.jsonfixtures/ui/map_context_evidence_drawer_admission/payloads/abstain-stale-aligned.jsonfixtures/ui/map_context_evidence_drawer_admission/payloads/answer-aligned.jsonfixtures/ui/map_context_evidence_drawer_admission/payloads/answer-wrong-selection.jsonpackages/envelopes/src/envelopes/__init__.pypackages/envelopes/src/envelopes/map_context_evidence_drawer.pytests/packages/envelopes/test_map_context_evidence_drawer_admission.pytools/validators/ui/validate_map_context_evidence_drawer_admission.pyDirectory Rules basis
ADR-0029 adopts Directory Governance Standard v2. Existing responsibility roots are used:
packages/envelopes/src/envelopes/docs/architecture/ui/fixtures/ui/tools/validators/ui/tests/packages/envelopes/.github/workflows/data/receipts/generated/No new root or parallel contract, schema, policy, evidence, source, release, proof, receipt, or publication authority is introduced. One PR is the smallest safe review boundary because code, fixtures, exact replay, tests, CI, architecture notes, and provenance share one observable behavior.
Local deterministic validation
Hosted CI additionally invokes the existing MapContextEnvelope and EvidenceDrawerPayload validators against the source fixtures before package tests and case replay.
Concurrent-main reconciliation
The feature was initially prepared against
main@a6bbaa2a7986858bd72629cf3a77181b9e72a761. During upload,mainadvanced through independently merged DecisionEnvelope validation, review-authority binding, and adjacent domain/governance slices.The intervening path set was inspected and found disjoint. The feature branch was synchronized without force in merge commit
424e06b1a054298a5f4ef435765f01e85c721fc9. Receipt-link commit2b6f3dcf9a4642f23055ef8c8e2a0eb785d31eadbinds the generated authoring receipt to PR #2105. Final comparison against currentmainstill shows exactly the intended 12 paths, three commits ahead, zero behind.Trust boundary / non-effects
A green result proves deterministic fixture-level cross-object admission behavior only. It does not:
EvidenceReftoEvidenceBundle;apps/explorer-web, a governed API, or a deployed runtime invokes the helper.Compatibility
The three existing schemas are unchanged. Existing MapContextEnvelope, EvidenceDrawerPayload, and DecisionEnvelope semantics remain authoritative. The package export addition is backward compatible;
build_runtime_response_candidateremains exported.GENERATED_RECEIPT
data/receipts/generated/genrec-map-context-evidence-drawer-admission-20260807.jsonThe receipt binds the exact bytes of all 11 authored implementation artifacts without self-reference and now records PR #2105 plus the synchronized base/head. Human review remains
pending; the receipt is provenance, not approval.Reviewer disposition
HOLD AS DRAFT pending exact-current-head hosted validation and independent review.
Reviewer focus:
SYSTEM_TESTopt-in;Release and publication posture
No merge, release, deployment, promotion, publication, source activation, or repository-setting change is requested or performed by this PR.
Rollback
Before merge: close this draft PR and delete
agent/map-context-evidence-drawer-admission-20260807.After an authorized merge: revert feature commit
c8e8a61f66cf13b4468bc4abb1e575796e01486b, synchronization commit424e06b1a054298a5f4ef435765f01e85c721fc9, receipt-link commit2b6f3dcf9a4642f23055ef8c8e2a0eb785d31ead, or the resulting merge commit as appropriate. No data migration, source deactivation, lifecycle reprocessing, cache invalidation, release withdrawal, or public correction is required because no runtime route or published state is activated.CONTRACT_VERSION followed
3.0.0