PT-C2-AB: add read-only execution eligibility surface for prepared effects#9
Merged
PT-C2-AB: add read-only execution eligibility surface for prepared effects#9
Conversation
8-task plan covering DTOs, query keys, mock fixtures, repository with evaluation context, barrel exports, UI panel, and stage card integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nown IDs - resolveEligibilityTone and buildEligibilityPresentation moved from eligibility.mocks.ts to eligibility.dto.ts (production code, not mock-only) - Mock repository now throws for unknown preparedEffectIds, consistent with chain.repositories.ts pattern Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Export ExecutionEligibilityPanel from components barrel - Add mt-1 spacing to eligibility status line in stage card Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Introduces a read-only execution eligibility surface for prepared effects. This adds a derived evaluation layer that determines whether a prepared effect meets all authority conditions for execution, without granting execution capability.
This is strictly observational:
What Changed
Substrate
ExecutionEligibilityViewand reason types (eligibility.dto.ts)createExecutionEligibilityRepository().evaluate(preparedEffectId)withEligibilityEvaluationContextcollectiveObservabilityQueryKeys.executionEligibility.detail(...)Tone Semantics
eligible→ successnot_eligible+ hard boundary violation → dangernot_eligible+ incomplete/missing conditions → warningHard failures:
scope_mismatch,upstream_revoked,delegation_invalid,delegation_revoked,permission_invalid,permission_expiredUI
ExecutionEligibilityPanel— read-only panel with tone-mapped borders/icons, zero interactive affordancesUI constraints: no execution affordances, no action buttons, language remains observational
Mocks
5 named fixtures: fully eligible, missing activation, expired permission, revoked delegation, scope mismatch
What Is NOT Included
Notes
governance-api.tsand jest types are pre-existing onmainTest Plan
npx tsc --noEmit— zero errors from eligibility filespnpm build— fails only on pre-existinggovernance-api.tserrors (verified same on main)🤖 Generated with Claude Code