You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address code-review findings on the policy mechanism
Eleven findings from the six-agent han review were confirmed by an
adversarial validation pass (with live reproductions); all confirmed
code findings are fixed here:
- Validate policy names eagerly at every declaration site (Worker.new,
Gang.new, Shifty.configure) via Policy.validate!, matching with_policy;
a typo now fails where it was written, not at first shift inside a
Fiber.
- Remove @resolved_policy memoization so what effective_policy reports
is always what intake enforces, even after late policy changes.
- Rescue PolicyError in Worker#shift and discard the terminated Fiber,
so a caller that rescues a PolicyViolation can keep shifting; the
violating value is consumed and the pipeline continues with the next.
- Govern Gang#shift's criteria-bypass path through the entry worker's
intake, matching Worker#shift's bypass behavior.
- Persist a Gang's declared pipeline policy and apply it to workers
appended after the declaration.
- Nil-guard Gang#supply so with_policy on an empty gang works.
- Cycle-guard the with_policy supply-chain walk (self-referential pipes
previously hung).
- Deprecation-warn on ALL side_worker mode: values, with a message that
names what the user actually typed; mode: :hardened maps to
policy: :isolated without double-warning.
- Delegate side_worker's scratch copy to Policy::Isolated (removes the
duplicated Marshal round-trip).
- Bound the PolicyViolation reachability walk (iterative, 50k-node cap)
so a deeply nested value can't SystemStackError during error
construction and mask the violation.
- New specs: eager validation, violation recovery, gang bypass/append/
precedence/empty-gang, self-pipe termination, mode: :normal warning,
Struct branch of the receiver heuristic.
0 commit comments