Documentation
¶
Index ¶
Constants ¶
const ( RowR01UnboundAllow = "R01_unbound_allow" RowR02MatchAllow = "R02_match_allow" RowR03MailboxRouted = "R03_mailbox_routed_allow" RowR04IgnorePin = "R04_ignore_pin_allow" RowR05SourceFromSession = "R05_source_from_session_allow" RowR06ListOwnBase = "R06_list_own_base_allow" RowR07DoctorOwnBase = "R07_doctor_own_base_allow" RowR08MismatchExit5 = "R08_mismatch_exit5" RowR09InvalidExit5 = "R09_invalid_pin_exit5" RowR10ListMismatchWarn = "R10_list_mismatch_warn" RowR11ListInvalidWarn = "R11_list_invalid_warn" RowR12DoctorMismatchErr = "R12_doctor_mismatch_structured_error" RowR13DoctorInvalidErr = "R13_doctor_invalid_structured_error" RowR14RouteMismatchJSON = "R14_route_mismatch_json_error" RowR15RouteInvalidJSON = "R15_route_invalid_json_error" )
The 15 stable rows are policy decisions, not call sites. Keep their IDs reviewable because the site-to-row map and equivalence tests refer to them.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decision ¶
func Decide ¶
Decide is the pure W2a policy table. Filesystem resolution, identity authentication, preflight validation, error construction, and output channels remain at the current call sites until Step 3 rewiring.
TargetRelationMismatch includes either a pin mismatch or a CWD conflict after the caller's evaluator has normalized those facts. Explicit roots and cross-project routing must not turn a pin mismatch into a match; they only affect the pre-table CWD check.
type Flags ¶
type Flags struct {
Routed bool // participating mailbox target was --session-routed
IgnorePin bool // --ignore-session-pin passed caller preflight
ExplicitRoot bool // caller supplied an explicit root
ExplicitContext bool // env --root/--session was visited
CrossProject bool // source guard serves a --project route
FromSession bool // send used --from-session source routing
Revalidation bool // watch/monitor callback phase; policy is unchanged
}
type Input ¶
type Input struct {
Kind Kind
Channel Channel
Pin PinState
Relation TargetRelation
Flags Flags
}
type Kind ¶
type Kind uint8
Kind identifies the policy surface consuming the shared pin evaluator. Route explain is a source policy with a different output channel; it is intentionally not a second source policy.
type TargetRelation ¶
type TargetRelation uint8
const ( // The caller has already normalized the evaluator facts. Unbound includes // no pin and no established conflicting tree; CWD conflicts normalize to // Mismatch before this policy table is consulted. TargetUnbound TargetRelation = iota TargetMatch TargetMismatch TargetOwnPinnedBase )