chore(P0): cherry-pick guardrails for fee/admin surface - #50
Merged
Merged
Conversation
Set up tooling so feature commits cherry-picked from lazorkit-protocol cannot accidentally bring fee/admin code into program-v2. - scripts/fee-paths.txt declares forbidden file paths and symbol regexes - scripts/check-no-fee.sh verifies the working tree (used by CI) - scripts/strip-fee.sh auto-removes forbidden files post-cherry-pick; symbol leaks are reported for manual cleanup (not auto-edited) - .github/workflows/check-no-fee.yml runs the verifier on every PR
4 tasks
onspeedhp
force-pushed
the
chore/cherry-pick-guardrails
branch
from
May 6, 2026 11:52
3fc7a7d to
f932074
Compare
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
P0 of the slot-share migration plan. Tooling-only — no
program/source changes, no audit scope.Sets up the safety nets for cherry-picking feature commits from
lazorkit-protocol(commercial, with-fee) into this repo (program-v2, foundation, no-fee), so fee/admin/FeeRecord surface cannot leak in by accident.Files added
scripts/fee-paths.txt— single source of truth: declares forbidden file paths and symbol regexes (ProtocolConfig,TreasuryShard,FeeRecord,try_collect_fee,creation_fee, …)scripts/check-no-fee.sh— read-only verifier (CI + local). Greps source against forbidden symbols + checks no forbidden paths exist. Used as a gate.scripts/strip-fee.sh— post-cherry-pick cleanup (--dry-runsupported). Auto-removes forbidden files; reports symbol leaks for manual cleanup (does not auto-edit code)..github/workflows/check-no-fee.yml— runscheck-no-fee.shon every PR + push to main.Cargo.toml— pins Solana CLI 3.0.4 for verified builds.Smoke-tested behavior
protocol_config.rs+ sneakTreasuryShardmention intowallet.rs→check-no-fee.shreports 4 violations with file:linestrip-fee.shauto-removes the file, leaves the symbol leak for manual fixcheck-no-fee.shpasses againStack ordering
This is the base of a 3-PR stack:
main)Merge in order to get a clean linear history.
Test plan
check-no-feepasses on this PRbash scripts/check-no-fee.shclean locallybash scripts/strip-fee.sh --dry-runreports no operations needed (clean state)🤖 Generated with Claude Code