-
Notifications
You must be signed in to change notification settings - Fork 149
Explore deterministic profiling gates for Crabbox runs #280
Copy link
Copy link
Open
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:securityThis issue is about security boundaries, credentials, authz, sandboxing, or sensitive data.This issue is about security boundaries, credentials, authz, sandboxing, or sensitive data.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.
Description
Metadata
Metadata
Assignees
Labels
P3Low-risk cleanup, docs, polish, ergonomics, or speculative feature.Low-risk cleanup, docs, polish, ergonomics, or speculative feature.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:needs-security-reviewClawSweeper marked this issue as needing security-sensitive review.ClawSweeper marked this issue as needing security-sensitive review.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:securityThis issue is about security boundaries, credentials, authz, sandboxing, or sensitive data.This issue is about security boundaries, credentials, authz, sandboxing, or sensitive data.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.
Type
Fields
Priority
None yet
Problem
Crabbox is good at running a repository's checks in disposable environments, but performance regression gates are still mostly outside its contract. Teams either rely on noisy wall-clock benchmarks on shared CI runners, maintain dedicated benchmarking machines, or skip perf gates because they are too flaky to trust.
This came up while reviewing the closed WASI provider PR (#211). A general WASI provider is probably not a fit for Crabbox's default workload: most repos need a shell, toolchains, subprocesses, sockets, and package managers. But deterministic profiling/perf gates may be a concrete capability where a restricted runtime is not a limitation; it is the feature.
Use case
A repo wants a CI check like:
crabbox run --profile perf -- go test ./parser -bench BenchmarkParse --bench-budget instructions=5000000or, for wasm-compilable targets:
The important outcome is not merely running WASI. The outcome is a reproducible run artifact that can say: this PR increased instruction count, allocations, CPU samples, or another agreed performance metric beyond budget.
Why Crabbox
Crabbox already owns the pieces that make this useful as a product surface:
A profiling gate would turn performance evidence into a first-class run result instead of a pile of provider-specific logs.
Possible shape
Start with a narrow, testable MVP rather than a broad profiler abstraction:
crabbox runthat records bounded artifacts and a small JSON summary.perf,pprof, Instruments, async-profiler, provider timing) behind the same evidence contract if there is demand.Non-goals
Open questions
If the answer is yes, #211 can be treated as prior art for the runtime plumbing, but the product ask should be narrower: reproducible performance evidence and budget enforcement for Crabbox runs.