Repository navigation
fix: post-chain-cut remediation (CI / integrity) - #47
Closed
marceloceccon wants to merge 1 commit into
Closed
marceloceccon wants to merge 1 commit into
marceloceccon wants to merge 1 commit into
Conversation
Toolchain only. No public API change; version deliberately stays 0.5.0. Every
chain-cut guarantee intact: archive/solana still unwired, exports map unchanged,
137 / 900-902 drop guards still pass.
LINT — was crashing, now runs clean
eslint-plugin-react under ESLint 10 threw "contextOrFilename.getFilename is not a
function" before linting a single file. No published eslint-plugin-react (max
7.37.5, peers eslint ^3..^9.7) or eslint-plugin-jsx-a11y (max 6.10.2, peers ..^9)
supports ESLint 10, so the honest minimal fix is to pin the linter rather than the
plugins: eslint + @eslint/js ^10 -> ^9.39.5.
- .npmrc DELETED. The legacy-peer-deps=true workaround added during the chain cut
existed only because ESLint 10 broke the peer graph. With eslint 9 the graph
resolves strictly and `npm ci` succeeds with no flags.
- Caveat: eslint 9.39.5 warns "no longer supported". That is the trade — a
supported-but-broken linter vs an EOL-but-working one. The real exit is
upstream; logged in humanpending.md.
With lint actually executing, 23 masked errors surfaced. 14 mechanical ones fixed:
7 no-unnecessary-type-assertion (--fix), 3 prefer-for-of, 2 prefer-optional-chain,
2 require-await, 1 unused eslint-disable (replaced with one that states why the
cast exists). The prefer-optional-chain and prefer-for-of edits land in the
signed-config verifier and in permitDomainKey, so they were applied by hand, not by
a fixer, and proven behaviour-neutral: permit-allowlist + payment-config-verifier +
api-client suites pass 26/26.
The remaining 9 are react-hooks/set-state-in-effect, new in
eslint-plugin-react-hooks v7, flagging a pre-existing pattern in the payment modals
(an effect mirroring a `status` prop onto a local `step` machine). That is a real
refactor of live payment-flow state and does not belong in a CI-repair change, so
the rule is set to `warn` with the rationale inline in eslint.config.js. Lint now
reports 0 errors / 10 warnings and exits 0. No security or correctness rule relaxed.
BUILD — failed in two places, both fixed
1. Tailwind v4 moved its PostCSS plugin out; passing `tailwindcss` directly throws.
Added @tailwindcss/postcss and repointed postcss.config.js.
2. esbuild was never installed, so Vite died with "Cannot find package 'esbuild'":
- overrides.esbuild pinned ^0.25.0 while Vite 8.3.1 peers ^0.27.0 || ^0.28.0 —
an unsatisfiable slot, so npm installed nothing. Raised to ^0.28.1, which also
clears GHSA-gv7w-rqvm-qjhr (HIGH, esbuild < 0.28.1) and GHSA-g7r4-m6w7-qqqr.
The old ^0.25.0 pin was itself vulnerable to both.
- Vite declares esbuild as an OPTIONAL peer, so it is never installed
transitively. Added as an explicit devDependency.
Verified locally (executed), from a clean node_modules each time
- npm ci (no flags, no .npmrc): clean.
- npm run typecheck: PASS.
- npm run lint: exit 0 — 0 errors, 10 warnings.
- npx vitest run: 165 passed, 4 failed.
- npm run build: PASS. dist/ has no solana entry; styles.css emitted.
- npm audit: 0 vulnerabilities (was 10 high / 16 moderate / 2 low). No --force.
- Simulated the supply-chain job: `npm ci --ignore-scripts && npm run build`
succeeds, and `npm pack --dry-run` ships 68 files with no src/ or archive/.
Still failing, deliberately untouched: the 4 signPermit cases in
permit-allowlist.test.ts hit ADR-0004's KNOWN_PERMIT_TOKENS gate with a
non-allow-listed token domain, and the shipped allowlist holds one placeholder
digest. Making them pass means deciding the real allowlist contents. The gate was
NOT weakened and the tests were NOT mocked out.
3 of 5 tasks
Member
Author
marceloceccon
added a commit
that referenced
this pull request
Sep 30, 2026
…-2026-09-29 demo-95: reference-aware pay (payIn*WithReference), real permit allowlist (HP-5), 0.6.0 — supersedes #47
Member
Author
|
superseded by #48 |
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.
Covers R3 — restore
npm run lintandnpm run build.Toolchain only. No public API change; version deliberately stays
0.5.0. Chain-cut guarantees re-verified:archive/solana/still unwired,exportsstill. / ./tron / ./headless / ./wc / ./styles.css, and the 137 / 900–902 drop guards still pass.Lint was crashing, not failing
eslint-plugin-reactunder ESLint 10 threwTypeError: contextOrFilename.getFilename is not a functionbefore linting a single file. I checked the registry: no publishedeslint-plugin-react(max 7.37.5, peerseslint ^3 … ^9.7) oreslint-plugin-jsx-a11y(max 6.10.2, peers… ^9) supports ESLint 10. So the honest minimal fix is to pin the linter, not chase the plugins:eslint+@eslint/js^10→^9.39.5..npmrcis deleted. Thelegacy-peer-deps=trueworkaround I added during the chain cut existed only because ESLint 10 broke the peer graph. With eslint 9 the graph resolves strictly —npm cinow succeeds with no flags. That workaround is gone rather than inherited.humanpending.md.23 previously-masked errors surfaced; 14 fixed
no-unnecessary-type-assertioneslint --fixprefer-for-offor…of(incl.permitDomainKey)prefer-optional-chainpayment-config-verifier.tsrequire-awaitPromise.resolve/Promise.rejecteslint-disableTwo of those land in the signed-config verifier and in
permitDomainKey(which computes the permit-allowlist digest), so I applied them by hand, not via a fixer, and proved them behaviour-neutral: thepermit-allowlist,payment-config-verifierandapi-clientsuites pass 26/26.The remaining 9 are
react-hooks/set-state-in-effect, new ineslint-plugin-react-hooksv7. They flag a pre-existing pattern in the payment modals where an effect mirrors astatusprop onto a localstepstate machine. Fixing that is a genuine refactor of live payment-flow state, which does not belong in a CI-repair PR that cannot drive a wallet end to end. The rule is set towarn, with the reasoning written inline ineslint.config.jsand a named follow-up. Lint reports0 errors, 10 warningsand exits 0. No security or correctness rule was relaxed.Build failed in two places
tailwindcssitself as a plugin throws. Added@tailwindcss/postcss, repointedpostcss.config.js.esbuildwas never installed →Cannot find package 'esbuild'. Two independent causes:overrides.esbuildpinned^0.25.0while Vite 8.3.1 peers^0.27.0 || ^0.28.0— an unsatisfiable slot, so npm installed nothing at all. Raised to^0.28.1, which also clears GHSA-gv7w-rqvm-qjhr (high, esbuild< 0.28.1) and GHSA-g7r4-m6w7-qqqr. The old^0.25.0pin was itself vulnerable to both.esbuildas an optional peer, so it is never pulled in transitively. Added as an explicit devDependency.Verification — executed, clean
node_moduleseach timenpm ci(no flags, no.npmrc) → cleannpm run typecheck→ PASSnpm run lint→ exit 0, 0 errors / 10 warningsnpx vitest run→ 165 passed, 4 failednpm run build→ PASS;dist/has no solana entry,styles.cssemittednpm audit→ 0 vulnerabilities (was 10 high / 16 moderate / 2 low). No--force; the only version changes are the ones above.npm ci --ignore-scripts && npm run buildsucceeds, andnpm pack --dry-runships 68 files with nosrc/orarchive/.Still failing, deliberately
The 4
signPermitcases inpermit-allowlist.test.tshit ADR-0004'sKNOWN_PERMIT_TOKENSgate with a non-allow-listed token domain, and the shipped allowlist holds one placeholder digest. Making them pass means deciding the real allowlist contents. The gate was not weakened and the tests were not mocked out, per the handoff.D4a still blank. No Polygon or Solana revival. Do not merge without Marcelo go.