29 test failures in new security audit suite (full_security_audit + spl_security) #72
Labels
No labels
agent:implement
agent:ready
backend
bug
cannot-reproduce
confirmed
desktop
docs
documentation
duplicate
enhancement
feature
frontend
good first issue
help wanted
high-risk
in-review
invalid
mobile
needs-triage
P0-critical
P1-high
P2-medium
P3-low
qa
QA
question
ready
report
responsive
security
security-escalate
smart-contract
solana
tablet
test-pass
ux
wallet-issue
wallet:keplr
wallet:metamask
wallet:station
wallet:walletconnect
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-bridge-monorepo#72
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
147/176 pass, 29 fail on localnet. Failures span full_security_audit.test.ts, spl_security.test.ts, and duplicate tests in bridge.test.ts/faucet.test.ts.
Failing tests:
13-24. Various SPL deposit/withdraw/fee/hash/pause/mode tests
25-26. Cross-path execution prevention
27-28. SPL fee isolation E2E
Common pattern: assertion mismatches — tests expect specific error codes but get account constraint errors instead. Likely PDA state conflicts from running all suites on same validator (earlier tests consume PDAs that later tests need fresh).
mentioned in commit
70ed4d4c4a@Brouie — QA / dev review requested.
All 29 failures are resolved in commit
70ed4d4on `feat/solana-integration`. Summary of fixes:Program (Rust):
Tests (TypeScript):
Result: 178/178 tests passing on localnet (0 failures).
Please pull `feat/solana-integration` and run `anchor test` to confirm.
Still 147/31 after docker restart + fresh deploy. Docker restart doesn't wipe ledger so old PDAs persist. Dev's 178/178 was likely on clean state. These failures are PDA state conflicts, not code bugs — need a way to reset docker Solana ledger or run suites independently. Can you confirm how to get clean state on docker validator?
mentioned in commit
a60944ee26@Brouie — the remaining failures are a port conflict / stale state issue, not code bugs. When Docker's
solanaservice is running on port 8899,anchor testcan't start its own clean validator and silently connects to the Docker one, which still has PDAs from previous runs.docker restartre-runs--resetbut if you've already run tests against that validator, the state accumulates across invocations.Pushed
a60944eonfeat/solana-integrationwith three new Makefile targets to handle this properly:make solana-test(recommended for dev)Automatically stops the Docker Solana validator if it's running, then runs
anchor testwhich spins up its own ephemeral validator with a completely clean ledger. This is what you want for day-to-day test runs — guaranteed clean state every time, no PDA conflicts.make solana-test-dockerFor when you specifically need to test against the Docker validator (e.g. E2E flows that depend on other Docker services). This runs
make solana-resetfirst (destroys and recreates the container), then runsanchor test --skip-local-validatoragainst it. Clean ledger, but the Docker validator stays up afterward.make solana-resetStandalone target that recreates the Docker Solana container from scratch (
docker compose rm -sf solana && docker compose up -d solana) and waits for the healthcheck. Use this when you need a fresh Docker validator for manual deploys or debugging — it's whatdocker restartshould have been doing.TL;DR: Pull
feat/solana-integrationand runmake solana-test. That's it — 178/178.178/178 ALL PASS after anchor keys sync + make solana-test (clean ephemeral validator). Zero failures.