registrystack / registrystack/registry-stack

Governed actions: justify or expose the fixed ceilings

Open
#932 0 comments 0 reactions 0 assignees View on GitHub
area:breg criticality:p3 enhancement rust triage:needs-implementation
Dominant language
Rust
Stars
2
Forks
0
Avg merge
2h 57m
Merged PRs (30d)
128

Description

Found in the 0.28.0 pre-release review (2026-09-08). Line references are as of main after #926.

Several limits in governed actions are asserted without a matrix row naming the threat, and none is operator-tunable:
- Two Evidence capabilities per action: `MAX_EVIDENCE_CAPABILITIES` in `action_evidence_contracts.rs:17`, also baked into the DDL as `CHECK (ordinal >= 0 AND ordinal < 2)` in `mutation.rs:351`, so raising the constant is a migration. Derive the constraint from the constant or drop the DDL bound and keep the compiler rule.
- Eight concurrent evaluations process-wide: `Semaphore::new(MAXIMUM_EVIDENCE_EVALUATIONS)` in `action_evidence.rs:45`, absent from `EvidenceProviderConfig`, and no test asserts the shipped value. Expose per provider or per runtime.
- The 4096-byte pattern cap in `compiler.rs:1871` is a bare literal written twice with no named constant and no boundary test. Promote it next to the other Rhai and storage limits and test 4096/4097.
- `products/breg/immediate-actions.md:651-660` calls these numbers "Effective defaults" although none is overridable. Rename to fixed limits or make them defaults in fact.

Write slots, refusals, patterns, membership and atomic erasure are already justified by BREG-SEC-36 to 39 and 48; this ticket covers the rest.

Contributor guide

Open the contributing guide

Research direction

Start with action_evidence_contracts.rs:17, mutation.rs:351, action_evidence.rs:45, and compiler.rs:1871, then review products/breg/immediate-actions.md:651-660. Check existing limit and compiler tests before deciding how the named ceilings should be represented. Done means every listed limit is justified or consistently configurable, the 4096/4097 boundary is covered, and the documentation matches the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, compilers, database, documentation, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.