Skip to content

feat(mission): lower effect/flow/lineage bounds to Biscuit (#43)#56

Open
gnanirahulnutakki wants to merge 1 commit into
devfrom
fix/A6-mission-lowering
Open

feat(mission): lower effect/flow/lineage bounds to Biscuit (#43)#56
gnanirahulnutakki wants to merge 1 commit into
devfrom
fix/A6-mission-lowering

Conversation

@gnanirahulnutakki

Copy link
Copy Markdown
Member

Summary

Closes #43. Implements the three NotImplementedError-guarded policy categories in python/vibap/mission_compile.py:

  • effect_policies — emits effect_limit(class, limit) facts + check if budget_delta($c,$d), effect_limit($c,$l), $d <= $l. Validates: class in valid enum, non-negative limit, no duplicate classes.
  • flow_policies — computes effective allow set at compile time (deny beats allow on same pair), emits flow_allow(from, to) facts + check if information_flow($from,$to), flow_allow($from,$to). Default-deny: any asserted flow without a matching allow is rejected.
  • lineage_budgets — emits lineage_ceiling(class, ceiling) facts + check if budget_spent($c,$t), lineage_ceiling($c,$ceil), $t <= $ceil. Validates reserved <= ceiling at compile time per spec invariant. Signature corrected from Sequence[dict] to dict | None to match MissionDeclaration.lineage_budgets type.

All three use biscuit-python parameter-binding API (not f-strings), following the Lane B audit pattern.

Biscuit semantics note

check all is not supported in biscuit-python 0.4.0, so check if (existential) is used. For effect and lineage checks, this enforces correctly when the proxy asserts one side-effect class per authorization — the common case. Multi-class operations need additional application-level enforcement via fact queries. This is documented in the function docstrings.

Test plan

  • 53 test_mission_compile.py tests passing (31 new: 12 effect, 11 flow, 12 lineage + aggregator)
  • Full Python suite: 800 passed, 32 skipped (no regressions)
  • Full Go suite: all packages pass

Implements the three previously-unguarded policy categories in
mission_compile.py:

- effect_policies: emits effect_limit(class, limit) facts + a single
  check if budget_delta($c,$d), effect_limit($c,$l), $d <= $l check.
  Validates class enum, non-negative limit, no duplicate classes.

- flow_policies: computes effective allow set at compile time (deny
  beats allow on same pair), emits flow_allow(from, to) facts +
  check if information_flow($from,$to), flow_allow($from,$to).
  Default-deny: any asserted flow without a matching allow is rejected.

- lineage_budgets: emits lineage_ceiling(class, ceiling) facts +
  check if budget_spent($c,$t), lineage_ceiling($c,$ceil), $t <= $ceil.
  Validates reserved <= ceiling at compile time per spec invariant.
  Signature changed from Sequence[dict] to dict|None to match
  MissionDeclaration.lineage_budgets type.

All three lower to Biscuit parameter-binding API (not f-strings).
Tests: 53 total (31 new), covering happy-path emission, validation
errors, deny-beats-allow semantics, zero limits, and special-char
parameter binding safety.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement mission-level effect/flow/lineage lowering in mission_compile

1 participant