Skip to content

pnpm - SFW#2207

Merged
prxt6529 merged 58 commits intomainfrom
pnpm-sfw
Apr 7, 2026
Merged

pnpm - SFW#2207
prxt6529 merged 58 commits intomainfrom
pnpm-sfw

Conversation

@prxt6529
Copy link
Copy Markdown
Collaborator

@prxt6529 prxt6529 commented Apr 3, 2026

AFTER MERGE

Pull latest main, then run:
./bin/6529 bootstrap

Then follow the printed instructions.

Summary by CodeRabbit

  • New Features

    • Repo-wide command wrapper for running dev/build/start/test workflows
    • Procfile and deployment verification to ensure packaged runtime includes dependencies
  • Changes

    • Enforced pnpm via Corepack; direct npm/yarn/npx/pnpm usage is blocked in favor of the wrapper
    • CI and local workflows now use the pinned pnpm flow and secure install wrapper; packaging prunes production deps
    • .gitignore updated for pnpm cache paths
  • Documentation

    • Updated README and added developer guides describing the new install/run/migration workflow

prxt6529 added 11 commits April 2, 2026 18:43
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Comment thread .github/workflows/build-upload-deploy-prod.yml Fixed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 3, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Migrates the repository from npm to pnpm (pinned via packageManager/Corepack), adds a repo-local command wrapper bin/6529 with blocking shims for npm/npx/yarn/pnpm, integrates Socket Firewall for secure installs, updates CI/CD and EB runtime bundling, and adds guard scripts, shims, and documentation.

Changes

Cohort / File(s) Summary
Package metadata & ignores
package.json, .npmpackagejsonlintrc.json, .gitignore
Switch packageManager to pnpm@10.33.0, remove npm-package-json-lint config, and add pnpm cache/temp ignores.
Primary wrapper & bin enforcement
bin/6529, bin/6529.cmd, bin/pnpm, bin/npm, bin/npx, bin/yarn
Add 6529 dispatcher (Bash + Windows shim) and repo policy wrappers that block direct npm/npx/yarn and restrict pnpm to allowed wrapper contexts.
Secure install & enforcement scripts
scripts/run-secure-pnpm.cjs, scripts/enforce-package-manager.cjs, scripts/assert-no-package-lock.cjs, scripts/require-6529-command.cjs, scripts/lint-package-json.cjs
New CLI gates: run pnpm under Socket Firewall, enforce package-manager usage, assert no package-lock.json, require 6529 gate, and lint package.json versions.
Bootstrap & Corepack helpers
scripts/setup-corepack-pnpm.sh, scripts/bootstrap-6529-command.sh, dev-setup/run-setup.sh
Corepack activation, repo PATH shim bootstrap, and dev-setup updated to activate pinned pnpm and install/verify Socket Firewall; PATH resolution helpers added.
CI / packaging / EB runtime
.github/workflows/build-upload-deploy-prod.yml, .ebextensions/runtime-bundle.config, .ebextensions/npm.config
CI switched to Corepack+pinned pnpm + SocketDev firewall and ./bin/6529 flows; added EB runtime-bundle verification and removed the old EB npm install container command (.ebextensions/npm.config deleted).
Run/start scripts & pm2/Procfile
scripts/start-next.cjs, Procfile, scripts/dev-open.cjs, scripts/staging.sh
Add Next start wrapper, update Procfile to use it, and replace direct npm invocations with ./bin/6529 in dev/staging scripts.
Dev tooling & quality scripts
scripts/quality.js, scripts/bootstrap-6529-command.sh, scripts/setup-corepack-pnpm.sh, scripts/worktree/*, playwright.config.ts
Redirect tooling (format/lint/tsc/knip/playwright) to use the 6529 wrapper or secure pnpm; add bootstrap/setup helpers and worktree changes.
Docs & migration notes
README.md, dev-setup/README.md, docs/developer/pnpm-and-socket-firewall.md, docs/developer/pnpm-socket-firewall-migration-overview.txt, standalone/.../README.md
Extensive documentation describing pnpm/Corepack, Socket Firewall integration, 6529 usage, bootstrap steps, and deployment model.
Lint config adjustments
eslint.config.mjs, eslint.config.tight.mjs
Add .next-static-export ignore patterns to ESLint configs.
VCS/Windows attributes
.gitattributes, bin/6529.cmd
Enforce CRLF for bin/*.cmd and add Windows shim for 6529.

Sequence Diagram(s)

sequenceDiagram
  participant CI as GitHub Actions
  participant SFW as Socket Firewall (sfw)
  participant PNPM as pnpm (Corepack)
  participant Builder as Build step (Next/Webpack)
  participant Pruner as Prune step
  participant Packager as Zip artifact
  participant EB as Elastic Beanstalk

  CI->>CI: enable Corepack & prepare pinned pnpm
  CI->>SFW: invoke `sfw pnpm --frozen-lockfile` (scripts/run-secure-pnpm)
  SFW->>PNPM: execute pnpm install --frozen-lockfile
  PNPM->>Builder: run `./bin/6529 build`
  Builder->>Pruner: run `./bin/6529 prune:prod`
  Pruner->>Packager: include pruned `node_modules` into zip (-yr)
  Packager->>EB: upload artifact
  EB->>EB: run runtime-bundle verification (.ebextensions/runtime-bundle.config)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • wip #2199 — Related CI/packaging and deployment changes affecting workflows and startup artifacts.
  • wip #2192 — Overlaps in CI Corepack/pnpm setup and caching changes.
  • Switch pnpm #2188 — Parallel migration from npm to pnpm touching deployment, scripts, and EB configs.

Suggested reviewers

  • simo6529
  • ragnep

Poem

🐰 I hopped in with a wrapper bright,
pnpm snug under Corepack's light,
Firewall guards each install and run,
6529 leads—now work is fun,
tiny hops, a secure delight! 🎉

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 26.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'pnpm - SFW' is vague and uses non-descriptive abbreviations that don't clearly convey the scope of this substantial changeset. Replace with a more specific title that describes the main change, such as 'Migrate package manager from npm to pnpm with Socket Firewall integration' or 'Switch to pnpm with Socket Firewall for secure dependency management'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pnpm-sfw

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Signed-off-by: prxt6529 <prxt@6529.io>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

♻️ Duplicate comments (1)
.github/workflows/build-upload-deploy-prod.yml (1)

30-33: ⚠️ Potential issue | 🟠 Major

Pin the Socket Firewall action to a commit SHA for supply chain security.

The socketdev/action@v1 reference uses an unpinned tag, which poses a supply chain risk if the tag is moved to a compromised commit.

,

🔒 Proposed fix
      - name: Install Socket Firewall
-        uses: socketdev/action@v1
+        uses: socketdev/action@<commit-sha>  # pin to specific commit
        with:
          mode: firewall
What is the latest commit SHA for socketdev/action v1 tag on GitHub?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build-upload-deploy-prod.yml around lines 30 - 33, The
GitHub Action step "Install Socket Firewall" currently uses the unpinned tag
socketdev/action@v1; replace that with the specific commit SHA for the v1 tag
(e.g., socketdev/action@<COMMIT_SHA>) to pin the dependency and mitigate
supply-chain risk, updating the uses entry for the step named "Install Socket
Firewall" to reference the exact SHA after verifying the latest commit for the
v1 tag on the socketdev/action repository.
🧹 Nitpick comments (8)
scripts/lint-package-json.cjs (1)

6-7: Harden package.json loading for consistent CI failures.

This currently depends on cwd and throws raw parse/read exceptions. Use repo-root-relative path plus explicit error handling for clearer failures.

♻️ Proposed fix
-const packageJsonPath = resolve(process.cwd(), "package.json");
-const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8"));
+const packageJsonPath = resolve(__dirname, "..", "package.json");
+let packageJson;
+try {
+  packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8"));
+} catch (error) {
+  console.error(`Failed to read/parse ${packageJsonPath}: ${error.message}`);
+  process.exit(1);
+}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/lint-package-json.cjs` around lines 6 - 7, The package.json loading
uses process.cwd() and directly calls readFileSync/JSON.parse which can throw
raw errors; change the path resolution to use a repo-root-relative method
(replace resolve(process.cwd(), "package.json") with a deterministic repo root
resolver) and wrap the readFileSync + JSON.parse calls in a try/catch around the
packageJsonPath/packageJson logic to produce a clear, informative error message
(include which path failed and the caught error) and exit nonzero; update
references to packageJsonPath, packageJson, resolve, readFileSync, and
JSON.parse accordingly.
scripts/assert-no-package-lock.cjs (1)

6-6: Make lockfile guard root-stable instead of cwd-dependent.

Resolving from process.cwd() can miss the root package-lock.json when invoked from another directory. Prefer resolving from __dirname.

♻️ Proposed fix
-const packageLockPath = resolve(process.cwd(), "package-lock.json");
+const packageLockPath = resolve(__dirname, "..", "package-lock.json");
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/assert-no-package-lock.cjs` at line 6, The packageLockPath is
resolved from process.cwd() which is cwd-dependent; change the resolution in
scripts/assert-no-package-lock.cjs so packageLockPath is rooted at the
repository script location using __dirname (e.g., use path.resolve(__dirname,
"..", "package-lock.json") or otherwise resolve from __dirname) instead of
resolve(process.cwd(), "package-lock.json") so the guard always checks the
repository root lockfile; update the packageLockPath assignment (the variable
named packageLockPath and the resolve call) accordingly.
bin/6529 (2)

92-94: Inconsistent path handling: staging uses relative path while bootstrap uses $REPO_ROOT.

Line 43 uses "$REPO_ROOT/scripts/bootstrap-6529-command.sh" but Line 93 uses scripts/staging.sh. While this works because the script doesn't change directories, it's inconsistent.

🛠️ Suggested consistency fix
   staging)
-    exec bash scripts/staging.sh "$@"
+    exec bash "$REPO_ROOT/scripts/staging.sh" "$@"
     ;;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bin/6529` around lines 92 - 94, The staging case uses a relative path
("scripts/staging.sh") while the bootstrap branch uses
"$REPO_ROOT/scripts/bootstrap-6529-command.sh"; update the staging branch (the
"staging" case that currently calls exec bash scripts/staging.sh) to use the
same repository-rooted path by invoking "$REPO_ROOT/scripts/staging.sh" so path
handling is consistent with the bootstrap invocation.

67-76: Dev commands bypass pnpm run and invoke Node scripts directly.

The dev, dev:webpack, and dev:open commands execute Node scripts directly rather than going through pnpm run dev. This is intentional for performance, but means these scripts won't trigger pnpm lifecycle hooks.

This is fine since these are development commands, but worth noting that they differ from the help text which states "6529 dev -> pnpm dev".

📝 Update help text for accuracy
-  6529 dev             -> pnpm dev
+  6529 dev             -> node scripts/dev-with-fallback.cjs

Or alternatively, route through pnpm for consistency:

   dev)
-    exec node scripts/dev-with-fallback.cjs "$@"
+    exec "$REAL_PNPM" run dev "$@"
     ;;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@bin/6529` around lines 67 - 76, Help text is inaccurate because the dev
commands (case branches for "dev", "dev:webpack", and "dev:open") invoke Node
directly via scripts/dev-with-fallback.cjs and scripts/dev-open.cjs instead of
routing through pnpm; either update the help text that currently states "6529
dev -> pnpm dev" to reflect direct Node execution, or change the case branches
to call pnpm run (e.g. use "exec pnpm run dev" / "exec pnpm run dev:webpack" /
"exec pnpm run dev:open") so lifecycle hooks run—pick one approach and apply it
consistently to the "dev", "dev:webpack", and "dev:open" branches and the
corresponding help string.
README.md (2)

117-117: Hardcoded pnpm version may drift from package.json.

Line 117 hardcodes pnpm@10.33.0. If packageManager in package.json is updated, this documentation will become stale.

Consider referencing the version dynamically or adding a note to update both locations together.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` at line 117, The README hardcodes the pnpm version in the command
"corepack prepare pnpm@10.33.0 --activate", which can drift from the
packageManager field in package.json; update the README to derive or reference
the packageManager version instead of a literal (e.g., instruct to run corepack
prepare pnpm@<package.json packageManager version> --activate or add a clear
note to update both README and package.json together), and mention the
packageManager field by name so reviewers can locate and keep versions in sync.

112-124: Add language specifiers to fenced code blocks for consistency.

Several code blocks lack language identifiers (Lines 122, 154, etc.), which affects syntax highlighting and linting.

📝 Example fix for line 122
-```
+```bash
 6529 install

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @README.md around lines 112 - 124, The README's fenced code blocks in the
"Bootstrap Corepack and Socket Firewall once on your machine" section are
missing language specifiers; update each triple-backtick block that contains
shell commands (e.g., the block with "npm install --global corepack@latest sfw"
and the block with "6529 install") to include a language tag like "bash" (e.g.,

fenced blocks (lines around the same section) and add appropriate language
identifiers where missing to ensure consistent formatting.
package.json (1)

6-62: Consider extracting the command gate pattern to reduce repetition.

Nearly every script starts with node scripts/require-6529-command.cjs &&. While this serves an important security purpose, the repetition is significant.

An alternative approach would be to create a wrapper script that checks the gate and then executes the actual command, reducing boilerplate. However, this is a trade-off against explicitness and debuggability.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` around lines 6 - 62, Many package.json scripts repetitively
prefix commands with "node scripts/require-6529-command.cjs &&"; create a single
wrapper (e.g., scripts/gated-run.cjs) that invokes require-6529-command.cjs and
then spawns the real command with argv forwarding and proper exit code
propagation, then replace occurrences in the scripts (for example the "dev",
"build", "test", "lint", "format", "export-mint-page" families) to call the
wrapper (e.g., "node scripts/gated-run.cjs <original command>") so the gate
check is centralized while preserving behavior, arguments, and error handling
for functions/commands referenced in package.json.
dev-setup/run-setup.sh (1)

153-167: Minor: Improve the sfw detection message.

Line 155 always prints "installed" when sfw exists, regardless of whether sfw --help succeeds. The output could be more informative.

🛠️ Suggested improvement
 install_socket_firewall() {
   if command -v sfw >/dev/null 2>&1; then
-    color green "Socket Firewall: $(sfw --help >/dev/null 2>&1 && echo installed)"
+    color green "Socket Firewall: $(sfw --version 2>/dev/null || echo 'installed')"
     return 0
   fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dev-setup/run-setup.sh` around lines 153 - 167, The install_socket_firewall
function prints "installed" unconditionally when sfw exists; change the
detection to first verify sfw is executable with command -v sfw and then run sfw
--help (or another lightweight check like sfw --version) and branch on its exit
status: if sfw --help succeeds, call color green "Socket Firewall: installed",
if it exists but help fails call color yellow "Socket Firewall found but help
failed" (or similar), otherwise proceed with installation logic; update
references in the function (symbols: install_socket_firewall, sfw, color, uname
-s) accordingly and ensure the final command -v check and error message remain
intact.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/build-upload-deploy-prod.yml:
- Around line 35-42: Move the pnpm activation so it's available before
setup-node attempts to use it: run the "Activate pinned pnpm via Corepack" step
(scripts/setup-corepack-pnpm.sh) prior to the "Install Node.js" step that uses
actions/setup-node@v4 with cache: "pnpm", or alternatively replace the
activation step with pnpm/action-setup to install pnpm before the setup-node
cache is configured; ensure the step names "Activate pinned pnpm via Corepack"
and "Install Node.js" reflect the new order.

In `@docs/developer/pnpm-and-socket-firewall.md`:
- Line 6: Replace the absolute local filesystem path in the docs: update the
sentence that references
`/Users/ppan/Desktop/6529git/6529seize-frontend/package.json` to use a
repository-relative path such as `package.json` or `./package.json`, keeping the
reference to the `packageManager` field and Corepack intact (look for the
sentence mentioning the pinned version, `packageManager` field and Corepack in
the docs/developer/pnpm-and-socket-firewall.md file).
- Around line 95-99: The markdown contains absolute local filesystem links to
package.json and scripts (e.g., `/Users/ppan/.../package.json`,
`.../scripts/require-6529-command.cjs`,
`.../scripts/assert-no-package-lock.cjs`); replace those absolute paths with
repository-relative paths (for example `package.json`,
`scripts/require-6529-command.cjs`, `scripts/assert-no-package-lock.cjs` or
`./package.json` etc.) so the links work for other clones and CI, updating every
occurrence in the doc where those absolute local paths appear.

In `@scripts/bootstrap-6529-command.sh`:
- Around line 70-86: The emitted snippet uses Bash-only constructs (arrays, read
-r -a, <<<) which break zsh; replace the array/here-string logic with a
POSIX-safe loop: save and set IFS=':', use "set -- $PATH" to split into
positional parameters, then iterate "for _6529_part in \"$@\"; do" and skip
empty entries or entries equal to "$REPO_ROOT/bin", building _6529_clean_path
likewise, restore IFS, export PATH="$_6529_clean_path" and unset the helper vars
(_6529_old_repo_bin, _6529_clean_path, _6529_part); ensure you keep the same
variable names (_6529_old_repo_bin, _6529_clean_path, _6529_path_parts not
needed) and the --print-export output remains POSIX/sh-compatible so zsh
sourcing works.

In `@scripts/dev-open.cjs`:
- Around line 16-18: The script spawns the Unix-only "./bin/6529" which fails on
Windows; replace the direct child_process spawn with a platform-aware solution
by using the cross-spawn package (install it and import/require it instead of
child_process.spawn) and call cross-spawn with the same arguments/stdio (e.g.,
proc = spawn("./bin/6529", ["dev"], { stdio: ["inherit","pipe","inherit"] })),
letting cross-spawn resolve the correct executable on Windows; alternatively, if
you prefer wrappers, add a Windows wrapper named 6529.cmd next to the bash
script and keep current spawn usage.

In `@standalone/standalone-memes-mint/README.md`:
- Around line 49-51: Update the README wording to reflect that the CloudFront
alias lookup uses an exact equality JMESPath filter rather than a containment
check: replace "containing `thememes.6529.io`" / "containing
`thememestest.6529.io`" with language stating it matches aliases exactly using
the JMESPath expression `Aliases.Items[?@ == '${hostname}']` (refer to the `6529
export-mint-page:sync` and `6529 export-mint-page:test:sync` entries to ensure
both Prod and Test rows mention exact alias equality).

---

Duplicate comments:
In @.github/workflows/build-upload-deploy-prod.yml:
- Around line 30-33: The GitHub Action step "Install Socket Firewall" currently
uses the unpinned tag socketdev/action@v1; replace that with the specific commit
SHA for the v1 tag (e.g., socketdev/action@<COMMIT_SHA>) to pin the dependency
and mitigate supply-chain risk, updating the uses entry for the step named
"Install Socket Firewall" to reference the exact SHA after verifying the latest
commit for the v1 tag on the socketdev/action repository.

---

Nitpick comments:
In `@bin/6529`:
- Around line 92-94: The staging case uses a relative path
("scripts/staging.sh") while the bootstrap branch uses
"$REPO_ROOT/scripts/bootstrap-6529-command.sh"; update the staging branch (the
"staging" case that currently calls exec bash scripts/staging.sh) to use the
same repository-rooted path by invoking "$REPO_ROOT/scripts/staging.sh" so path
handling is consistent with the bootstrap invocation.
- Around line 67-76: Help text is inaccurate because the dev commands (case
branches for "dev", "dev:webpack", and "dev:open") invoke Node directly via
scripts/dev-with-fallback.cjs and scripts/dev-open.cjs instead of routing
through pnpm; either update the help text that currently states "6529 dev ->
pnpm dev" to reflect direct Node execution, or change the case branches to call
pnpm run (e.g. use "exec pnpm run dev" / "exec pnpm run dev:webpack" / "exec
pnpm run dev:open") so lifecycle hooks run—pick one approach and apply it
consistently to the "dev", "dev:webpack", and "dev:open" branches and the
corresponding help string.

In `@dev-setup/run-setup.sh`:
- Around line 153-167: The install_socket_firewall function prints "installed"
unconditionally when sfw exists; change the detection to first verify sfw is
executable with command -v sfw and then run sfw --help (or another lightweight
check like sfw --version) and branch on its exit status: if sfw --help succeeds,
call color green "Socket Firewall: installed", if it exists but help fails call
color yellow "Socket Firewall found but help failed" (or similar), otherwise
proceed with installation logic; update references in the function (symbols:
install_socket_firewall, sfw, color, uname -s) accordingly and ensure the final
command -v check and error message remain intact.

In `@package.json`:
- Around line 6-62: Many package.json scripts repetitively prefix commands with
"node scripts/require-6529-command.cjs &&"; create a single wrapper (e.g.,
scripts/gated-run.cjs) that invokes require-6529-command.cjs and then spawns the
real command with argv forwarding and proper exit code propagation, then replace
occurrences in the scripts (for example the "dev", "build", "test", "lint",
"format", "export-mint-page" families) to call the wrapper (e.g., "node
scripts/gated-run.cjs <original command>") so the gate check is centralized
while preserving behavior, arguments, and error handling for functions/commands
referenced in package.json.

In `@README.md`:
- Line 117: The README hardcodes the pnpm version in the command "corepack
prepare pnpm@10.33.0 --activate", which can drift from the packageManager field
in package.json; update the README to derive or reference the packageManager
version instead of a literal (e.g., instruct to run corepack prepare
pnpm@<package.json packageManager version> --activate or add a clear note to
update both README and package.json together), and mention the packageManager
field by name so reviewers can locate and keep versions in sync.
- Around line 112-124: The README's fenced code blocks in the "Bootstrap
Corepack and Socket Firewall once on your machine" section are missing language
specifiers; update each triple-backtick block that contains shell commands
(e.g., the block with "npm install --global corepack@latest sfw" and the block
with "6529 install") to include a language tag like "bash" (e.g., ```bash) so
syntax highlighting and linters recognize them; review other nearby fenced
blocks (lines around the same section) and add appropriate language identifiers
where missing to ensure consistent formatting.

In `@scripts/assert-no-package-lock.cjs`:
- Line 6: The packageLockPath is resolved from process.cwd() which is
cwd-dependent; change the resolution in scripts/assert-no-package-lock.cjs so
packageLockPath is rooted at the repository script location using __dirname
(e.g., use path.resolve(__dirname, "..", "package-lock.json") or otherwise
resolve from __dirname) instead of resolve(process.cwd(), "package-lock.json")
so the guard always checks the repository root lockfile; update the
packageLockPath assignment (the variable named packageLockPath and the resolve
call) accordingly.

In `@scripts/lint-package-json.cjs`:
- Around line 6-7: The package.json loading uses process.cwd() and directly
calls readFileSync/JSON.parse which can throw raw errors; change the path
resolution to use a repo-root-relative method (replace resolve(process.cwd(),
"package.json") with a deterministic repo root resolver) and wrap the
readFileSync + JSON.parse calls in a try/catch around the
packageJsonPath/packageJson logic to produce a clear, informative error message
(include which path failed and the caught error) and exit nonzero; update
references to packageJsonPath, packageJson, resolve, readFileSync, and
JSON.parse accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 953748a9-36d4-47b1-b858-6b316efb6b83

📥 Commits

Reviewing files that changed from the base of the PR and between bb90662 and 0684d49.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (34)
  • .ebextensions/npm.config
  • .ebextensions/pnpm.config
  • .github/workflows/build-upload-deploy-prod.yml
  • .gitignore
  • .npmpackagejsonlintrc.json
  • Procfile
  • README.md
  • bin/6529
  • bin/npm
  • bin/npx
  • bin/pnpm
  • bin/yarn
  • dev-setup/README.md
  • dev-setup/run-setup.sh
  • docs/developer/pnpm-and-socket-firewall.md
  • docs/developer/pnpm-socket-firewall-migration-overview.txt
  • eslint.config.mjs
  • eslint.config.tight.mjs
  • package.json
  • playwright.config.ts
  • scripts/assert-no-package-lock.cjs
  • scripts/bootstrap-6529-command.sh
  • scripts/dev-open.cjs
  • scripts/enforce-package-manager.cjs
  • scripts/lint-package-json.cjs
  • scripts/quality.js
  • scripts/require-6529-command.cjs
  • scripts/run-secure-pnpm.cjs
  • scripts/setup-corepack-pnpm.sh
  • scripts/staging.sh
  • scripts/worktree/wt-add.sh
  • scripts/worktree/wt-common.sh
  • standalone/standalone-memes-mint/README.md
  • standalone/standalone-memes-mint/scripts/export-mint-page.cjs
💤 Files with no reviewable changes (2)
  • .ebextensions/npm.config
  • .npmpackagejsonlintrc.json

Comment thread .github/workflows/build-upload-deploy-prod.yml Outdated
Comment thread docs/developer/pnpm-and-socket-firewall.md Outdated
Comment thread docs/developer/pnpm-and-socket-firewall.md Outdated
Comment thread scripts/bootstrap-6529-command.sh
Comment thread scripts/dev-open.cjs Outdated
Comment thread standalone/standalone-memes-mint/README.md Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (4)
docs/developer/pnpm-and-socket-firewall.md (3)

6-6: ⚠️ Potential issue | 🟡 Minor

Remove absolute local filesystem path from documentation.

Line 6 contains /Users/ppan/Desktop/6529git/6529seize-frontend/package.json, which is a developer's local path that won't work for other contributors.

📝 Proposed fix
-manager. The pinned version is declared in [`package.json`](/Users/ppan/Desktop/6529git/6529seize-frontend/package.json) through the `packageManager` field and is activated with Corepack.
+manager. The pinned version is declared in [`package.json`](../../package.json) through the `packageManager` field and is activated with Corepack.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/developer/pnpm-and-socket-firewall.md` at line 6, The docs contain an
absolute local path to a developer's machine; open the text referencing
`/Users/.../package.json` and replace it with a repository-relative reference
such as `package.json` or `./package.json` (or a plain "package.json" link) and
keep the mention of the `packageManager` field and Corepack; update the sentence
so it reads something like "The pinned version is declared in package.json
through the `packageManager` field and is activated with Corepack." This removes
the sensitive/local path while preserving the reference to the package.json and
the `packageManager` field.

95-99: ⚠️ Potential issue | 🟡 Minor

Multiple absolute paths need to be converted to relative paths.

Lines 95-98 contain absolute local filesystem paths that should be relative repository paths.

📝 Proposed fix
-- [`package.json`](/Users/ppan/Desktop/6529git/6529seize-frontend/package.json) pins `pnpm@10.33.0`.
-- [`package.json`](/Users/ppan/Desktop/6529git/6529seize-frontend/package.json) has a `preinstall` guard that rejects `npm`, `yarn`, and insecure `pnpm install`.
-- [`scripts/require-6529-command.cjs`](/Users/ppan/Desktop/6529git/6529seize-frontend/scripts/require-6529-command.cjs) rejects repo script execution unless it came through `6529`.
-- [`scripts/assert-no-package-lock.cjs`](/Users/ppan/Desktop/6529git/6529seize-frontend/scripts/assert-no-package-lock.cjs) fails if `package-lock.json` reappears.
+- [`package.json`](../../package.json) pins `pnpm@10.33.0`.
+- [`package.json`](../../package.json) has a `preinstall` guard that rejects `npm`, `yarn`, and insecure `pnpm install`.
+- [`scripts/require-6529-command.cjs`](../../scripts/require-6529-command.cjs) rejects repo script execution unless it came through `6529`.
+- [`scripts/assert-no-package-lock.cjs`](../../scripts/assert-no-package-lock.cjs) fails if `package-lock.json` reappears.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/developer/pnpm-and-socket-firewall.md` around lines 95 - 99, The
markdown contains absolute local filesystem links to package.json and script
files; change those to repository-relative paths instead (e.g. replace
/Users/ppan/.../6529seize-frontend/package.json with ./package.json or
package.json, and replace the full local paths for scripts with
./scripts/require-6529-command.cjs and ./scripts/assert-no-package-lock.cjs).
Update the three links referencing package.json and the two script links so they
point to the repo-relative locations and keep the same link text.

114-116: ⚠️ Potential issue | 🟡 Minor

Convert absolute paths to relative paths for Procfile and pnpm.config.

📝 Proposed fix
 At deploy time, Elastic Beanstalk only needs pnpm available for the start
-command. [`Procfile`](/Users/ppan/Desktop/6529git/6529seize-frontend/Procfile)
-uses `pnpm start`, and [`pnpm.config`](/Users/ppan/Desktop/6529git/6529seize-frontend/.ebextensions/pnpm.config) activates the pinned pnpm version with Corepack and verifies that bundled runtime dependencies are present.
+command. [`Procfile`](../../Procfile)
+uses `pnpm start`, and [`pnpm.config`](../../.ebextensions/pnpm.config) activates the pinned pnpm version with Corepack and verifies that bundled runtime dependencies are present.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/developer/pnpm-and-socket-firewall.md` around lines 114 - 116, Update
the documentation links that reference the Procfile and pnpm.config using
absolute filesystem paths by replacing them with relative repository paths
(e.g., "./Procfile" and "./.ebextensions/pnpm.config" or simply "Procfile" and
".ebextensions/pnpm.config") so the references to Procfile and pnpm.config work
for other contributors and CI; locate the occurrences in the paragraph
mentioning `Procfile` and `pnpm.config` and change the markdown link targets to
relative paths preserving the same link text.
.github/workflows/build-upload-deploy-prod.yml (1)

36-43: ⚠️ Potential issue | 🟠 Major

pnpm must be activated before setup-node for caching to work.

The cache: "pnpm" option in setup-node@v4 requires pnpm to be available when it runs. Currently, pnpm is activated via Corepack at line 42-43, after setup-node executes at line 37. This causes the cache mechanism to fail because setup-node cannot locate the pnpm store without the pnpm binary present.

Reorder the steps so that "Activate pinned pnpm via Corepack" runs before "Install Node.js", or use pnpm/action-setup@v4 to install pnpm before the caching step.

      - name: Install Socket Firewall
        id: socket_firewall
        uses: SocketDev/action@2d3f25590c6ed6ba11a9a14c064d962a3a04698f # v1.3.1
        with:
          mode: firewall

+     - name: Activate pinned pnpm via Corepack
+       run: bash scripts/setup-corepack-pnpm.sh
+
      - name: Install Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "22"
          cache: "pnpm"

-     - name: Activate pinned pnpm via Corepack
-       run: bash scripts/setup-corepack-pnpm.sh
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build-upload-deploy-prod.yml around lines 36 - 43, Reorder
the workflow so pnpm is available before setup-node runs: move the step named
"Activate pinned pnpm via Corepack" (the run invoking
scripts/setup-corepack-pnpm.sh) to execute before the step named "Install
Node.js" (uses: actions/setup-node@v4 with cache: "pnpm"), or alternatively
replace the Corepack activation with a prior pnpm installer step such as
pnpm/action-setup@v4 so the pnpm binary exists when setup-node@v4 attempts to
configure pnpm caching.
🧹 Nitpick comments (1)
docs/developer/pnpm-and-socket-firewall.md (1)

28-40: Consider consolidating or differentiating the duplicate command lists.

Lines 13-24 and 31-40 show nearly identical command lists. The second block appears after mentioning .envrc but doesn't add new information beyond what's already shown. Consider either:

  1. Removing the second list and just noting that .envrc enables the shorthand
  2. Adding differentiation (e.g., showing the actual difference in invocation with/without .envrc)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/developer/pnpm-and-socket-firewall.md` around lines 28 - 40, The
documentation repeats the same shorthand command list twice around the `.envrc`
explanation; remove the duplicate second block or explicitly show the difference
between using the repo `.envrc` and not using it (e.g., keep the first list of
shorthand commands and either delete the second list after the `.envrc` mention
or replace it with a short note demonstrating the full invocation without
`.envrc` and the shortened invocation with `.envrc`); update the text
referencing `.envrc` so it clearly states that enabling `.envrc` adds local bin/
to PATH and enables the listed shorthands.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In @.github/workflows/build-upload-deploy-prod.yml:
- Around line 36-43: Reorder the workflow so pnpm is available before setup-node
runs: move the step named "Activate pinned pnpm via Corepack" (the run invoking
scripts/setup-corepack-pnpm.sh) to execute before the step named "Install
Node.js" (uses: actions/setup-node@v4 with cache: "pnpm"), or alternatively
replace the Corepack activation with a prior pnpm installer step such as
pnpm/action-setup@v4 so the pnpm binary exists when setup-node@v4 attempts to
configure pnpm caching.

In `@docs/developer/pnpm-and-socket-firewall.md`:
- Line 6: The docs contain an absolute local path to a developer's machine; open
the text referencing `/Users/.../package.json` and replace it with a
repository-relative reference such as `package.json` or `./package.json` (or a
plain "package.json" link) and keep the mention of the `packageManager` field
and Corepack; update the sentence so it reads something like "The pinned version
is declared in package.json through the `packageManager` field and is activated
with Corepack." This removes the sensitive/local path while preserving the
reference to the package.json and the `packageManager` field.
- Around line 95-99: The markdown contains absolute local filesystem links to
package.json and script files; change those to repository-relative paths instead
(e.g. replace /Users/ppan/.../6529seize-frontend/package.json with
./package.json or package.json, and replace the full local paths for scripts
with ./scripts/require-6529-command.cjs and
./scripts/assert-no-package-lock.cjs). Update the three links referencing
package.json and the two script links so they point to the repo-relative
locations and keep the same link text.
- Around line 114-116: Update the documentation links that reference the
Procfile and pnpm.config using absolute filesystem paths by replacing them with
relative repository paths (e.g., "./Procfile" and "./.ebextensions/pnpm.config"
or simply "Procfile" and ".ebextensions/pnpm.config") so the references to
Procfile and pnpm.config work for other contributors and CI; locate the
occurrences in the paragraph mentioning `Procfile` and `pnpm.config` and change
the markdown link targets to relative paths preserving the same link text.

---

Nitpick comments:
In `@docs/developer/pnpm-and-socket-firewall.md`:
- Around line 28-40: The documentation repeats the same shorthand command list
twice around the `.envrc` explanation; remove the duplicate second block or
explicitly show the difference between using the repo `.envrc` and not using it
(e.g., keep the first list of shorthand commands and either delete the second
list after the `.envrc` mention or replace it with a short note demonstrating
the full invocation without `.envrc` and the shortened invocation with
`.envrc`); update the text referencing `.envrc` so it clearly states that
enabling `.envrc` adds local bin/ to PATH and enables the listed shorthands.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6046aba7-2f61-42f4-b11f-6935a7095da1

📥 Commits

Reviewing files that changed from the base of the PR and between 0684d49 and 14c8315.

📒 Files selected for processing (4)
  • .github/workflows/build-upload-deploy-prod.yml
  • docs/developer/pnpm-and-socket-firewall.md
  • docs/developer/pnpm-socket-firewall-migration-overview.txt
  • scripts/run-secure-pnpm.cjs
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/run-secure-pnpm.cjs

prxt6529 added 4 commits April 3, 2026 12:11
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
.github/workflows/build-upload-deploy-prod.yml (1)

30-43: ⚠️ Potential issue | 🟡 Minor

pnpm must be activated before setup-node for caching to work.

The cache: "pnpm" option (line 34) requires pnpm to be pre-installed when setup-node@v4 runs. Currently, Corepack activation happens at line 42-43, after setup-node. This causes the cache mechanism to fail because setup-node cannot locate the pnpm store without the pnpm binary present.

Reorder the steps to activate Corepack/pnpm before setup-node:

🔧 Suggested reordering
     steps:
       - name: Checkout code
         uses: actions/checkout@v4

+      - name: Activate pinned pnpm via Corepack
+        run: bash scripts/setup-corepack-pnpm.sh
+
       - name: Install Node.js
         uses: actions/setup-node@v4
         with:
           node-version: "22"
           cache: "pnpm"

       - name: Install Socket Firewall
         id: socket_firewall
         uses: SocketDev/action@2d3f25590c6ed6ba11a9a14c064d962a3a04698f # v1.3.1
         with:
           mode: firewall

-      - name: Activate pinned pnpm via Corepack
-        run: bash scripts/setup-corepack-pnpm.sh
-
       - name: Assert npm lockfile is absent
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/build-upload-deploy-prod.yml around lines 30 - 43, The
pnpm Corepack activation step ("Activate pinned pnpm via Corepack" running
scripts/setup-corepack-pnpm.sh) must run before the "Install Node.js" step that
uses actions/setup-node@v4 with cache: "pnpm"; move the Corepack/pnpm activation
step to precede the setup-node step so pnpm is available when setup-node
attempts to configure pnpm caching, leaving the step names ("Activate pinned
pnpm via Corepack" and "Install Node.js") and the cache: "pnpm" option intact.
🧹 Nitpick comments (3)
README.md (1)

213-223: Add language identifiers to fenced code blocks.

Lines 215-217 and 221-223 have fenced code blocks without language specifiers.

📝 Suggested fix
 - Production

-```
+```bash
 6529 start

RUN USING PM2

- +bash
pm2 start ./bin/6529 --name=6529seize -- start

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@README.md` around lines 213 - 223, The README has two fenced code blocks
containing the commands "6529 start" and "pm2 start ./bin/6529 --name=6529seize
-- start" without language specifiers; update those two triple-backtick fences
to include a language identifier (use "bash") so they become fenced as ```bash
for both the single-line "6529 start" block and the PM2 command block to enable
proper syntax highlighting.
docs/developer/pnpm-socket-firewall-migration-overview.txt (2)

114-117: Clarify that npm install --global sfw is intentionally outside repo guardrails.

Given the doc strongly enforces “no npm/yarn installs” in-repo, this step can read as contradictory. Add one explicit note like “run outside the repo; repo preinstall guard does not apply” to avoid onboarding confusion.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/developer/pnpm-socket-firewall-migration-overview.txt` around lines 114
- 117, The step "npm install --global sfw" appears to contradict the repo's "no
npm/yarn installs" rule; update the docs by appending a short clarifying note
immediately after that step (near the line containing "npm install --global
sfw") stating that this global install must be run outside the repository and
that the repo's preinstall guard does not apply, so readers understand it's
intentional and exempt from in-repo restrictions.

25-29: Tighten wording: replace “exact same” with “same.”

Minor readability polish; this section is otherwise clear.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/developer/pnpm-socket-firewall-migration-overview.txt` around lines 25 -
29, Replace the phrase "exact same" with "same" in the sentence that reads "CI
and developers can activate the exact same package manager version with
Corepack." within the paragraph starting "The repo now pins a concrete pnpm
version in package.json and commits pnpm-lock.yaml." to tighten the wording
while keeping the rest of the sentence unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@bin/6529.cmd`:
- Around line 1-4: The batch file bin/6529.cmd uses LF-only line endings which
can break Windows parsing; convert it to CRLF and ensure future .cmd files keep
CRLF by either adding a .gitattributes entry (e.g., add "bin/*.cmd text
eol=crlf" to .gitattributes) or converting the file in-place (e.g., run unix2dos
on bin/6529.cmd or save with CRLF in your editor), then commit the updated
bin/6529.cmd (and .gitattributes if added).

In `@docs/developer/pnpm-socket-firewall-migration-overview.txt`:
- Around line 207-210: Update the sentence that says "A pnpm install
verification was started against the migrated lockfile to confirm the repo can
resolve through pnpm without npm" to state the concrete outcome (e.g., "A pnpm
install verification completed successfully against the migrated lockfile,
confirming the repo resolves through pnpm without npm" or "A pnpm install
verification failed with X scope limitation: ..."), referencing the same "pnpm
install verification" phrase so readers see the final status and any scope
limits or errors instead of the ambiguous "was started."

---

Duplicate comments:
In @.github/workflows/build-upload-deploy-prod.yml:
- Around line 30-43: The pnpm Corepack activation step ("Activate pinned pnpm
via Corepack" running scripts/setup-corepack-pnpm.sh) must run before the
"Install Node.js" step that uses actions/setup-node@v4 with cache: "pnpm"; move
the Corepack/pnpm activation step to precede the setup-node step so pnpm is
available when setup-node attempts to configure pnpm caching, leaving the step
names ("Activate pinned pnpm via Corepack" and "Install Node.js") and the cache:
"pnpm" option intact.

---

Nitpick comments:
In `@docs/developer/pnpm-socket-firewall-migration-overview.txt`:
- Around line 114-117: The step "npm install --global sfw" appears to contradict
the repo's "no npm/yarn installs" rule; update the docs by appending a short
clarifying note immediately after that step (near the line containing "npm
install --global sfw") stating that this global install must be run outside the
repository and that the repo's preinstall guard does not apply, so readers
understand it's intentional and exempt from in-repo restrictions.
- Around line 25-29: Replace the phrase "exact same" with "same" in the sentence
that reads "CI and developers can activate the exact same package manager
version with Corepack." within the paragraph starting "The repo now pins a
concrete pnpm version in package.json and commits pnpm-lock.yaml." to tighten
the wording while keeping the rest of the sentence unchanged.

In `@README.md`:
- Around line 213-223: The README has two fenced code blocks containing the
commands "6529 start" and "pm2 start ./bin/6529 --name=6529seize -- start"
without language specifiers; update those two triple-backtick fences to include
a language identifier (use "bash") so they become fenced as ```bash for both the
single-line "6529 start" block and the PM2 command block to enable proper syntax
highlighting.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b71a2b64-2c72-4f78-a847-276d8d6de862

📥 Commits

Reviewing files that changed from the base of the PR and between 14c8315 and c20a14a.

📒 Files selected for processing (20)
  • .ebextensions/runtime-bundle.config
  • .github/workflows/build-upload-deploy-prod.yml
  • Procfile
  • README.md
  • bin/6529
  • bin/6529.cmd
  • dev-setup/run-setup.sh
  • docs/developer/pnpm-and-socket-firewall.md
  • docs/developer/pnpm-socket-firewall-migration-overview.txt
  • package.json
  • scripts/assert-no-package-lock.cjs
  • scripts/bootstrap-6529-command.sh
  • scripts/dev-open.cjs
  • scripts/enforce-package-manager.cjs
  • scripts/lint-package-json.cjs
  • scripts/quality.js
  • scripts/require-6529-command.cjs
  • scripts/setup-corepack-pnpm.sh
  • scripts/start-next.cjs
  • standalone/standalone-memes-mint/README.md
✅ Files skipped from review due to trivial changes (2)
  • Procfile
  • scripts/enforce-package-manager.cjs
🚧 Files skipped from review as they are similar to previous changes (9)
  • scripts/assert-no-package-lock.cjs
  • scripts/dev-open.cjs
  • scripts/setup-corepack-pnpm.sh
  • scripts/require-6529-command.cjs
  • scripts/quality.js
  • scripts/lint-package-json.cjs
  • dev-setup/run-setup.sh
  • bin/6529
  • standalone/standalone-memes-mint/README.md

Comment thread bin/6529.cmd
Comment thread docs/developer/pnpm-socket-firewall-migration-overview.txt Outdated
prxt6529 added 2 commits April 6, 2026 10:00
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Comment thread .github/workflows/build-upload-deploy-prod.yml Fixed
prxt6529 added 3 commits April 6, 2026 10:12
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
dev-setup/run-setup.sh (1)

104-141: ⚠️ Potential issue | 🟠 Major

Resolve the real npm/pnpm binaries before calling them.

These helpers run inside a repo that shadows package managers under bin/ via .envrc (which adds bin/ to PATH). The repo's blocking wrappers prevent direct calls to npm -v, pnpm -v, and npm install --global sfw, breaking the setup script in the documented and supported environment (direnv + .envrc).

The wrappers are intentionally strict: bin/npm always exits with an error, and bin/pnpm requires special environment variables (SEIZE_6529_COMMAND=1 or SEIZE_SECURE_INSTALL=1) to bypass the block. The setup script does not set these, so these calls will fail.

Suggested fix
+resolve_real_pm_bin() {
+  local name="$1"
+  local clean_path=""
+  IFS=':' read -r -a parts <<< "${PATH:-}"
+  for part in "${parts[@]}"; do
+    [[ -z "$part" || "$part" == "$REPO_ROOT/bin" ]] && continue
+    clean_path="${clean_path:+$clean_path:}$part"
+  done
+  PATH="$clean_path" command -v "$name"
+}
+
 ensure_node_ge20() {
   # Accept Node >= 20; install Node 20 only if missing or < 20.
   local os="$(uname -s)"; local need_major=20; local have_major=0
@@
-  color green "Using Node $(node -v), npm $(npm -v)"
+  local real_npm; real_npm="$(resolve_real_pm_bin npm)"
+  color green "Using Node $(node -v), npm $("$real_npm" -v)"
   return 0
 }
 
 activate_pnpm_with_corepack() {
   color yellow "Activating the repo-pinned pnpm version with Corepack…"
@@
-  color green "pnpm: $(pnpm -v)"
+  local real_pnpm; real_pnpm="$(resolve_real_pm_bin pnpm)"
+  color green "pnpm: $("$real_pnpm" -v)"
   return 0
 }
 
 install_socket_firewall() {
@@
+  local real_npm; real_npm="$(resolve_real_pm_bin npm)"
   color yellow "Installing Socket Firewall globally…"
   if [[ "$(uname -s)" == "Darwin" ]]; then
-    npm install --global sfw
+    "$real_npm" install --global sfw
   else
-    sudo npm install --global sfw
+    sudo "$real_npm" install --global sfw
   fi
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@dev-setup/run-setup.sh` around lines 104 - 141, The script fails when
repo-local wrappers in bin/ shadow real package managers; update
ensure_node_ge20 (and any places calling npm/pnpm, e.g., npm -v, pnpm -v, npm
install --global sfw) to resolve the real binary path first (use command -v -a
or which -a), filter out the repo's ./bin paths (e.g., entries containing
"$PWD/bin" or the repo root/bin), and then invoke the first remaining absolute
path (store in a variable like REAL_NPM or REAL_PNPM) instead of calling
npm/pnpm directly; if no external binary is found, print an actionable error and
exit.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@bin/6529`:
- Around line 46-59: Update the four case branches that call node/bash relative
to the caller CWD—specifically the dev, dev:webpack, dev:open, and start case
labels—to execute their scripts from the repository root by prefixing the script
paths with "$REPO_ROOT"/ (e.g., change exec node scripts/... to exec node
"$REPO_ROOT"/scripts/... and similarly for the env USE_TURBO line and
dev:open/start branches), ensuring they match how staging/bootstrap already use
"$REPO_ROOT".

In `@docs/developer/pnpm-and-socket-firewall.md`:
- Around line 34-53: Reorder and adjust the first-run instructions so the local
shim is invoked before any bare `6529` commands: replace the bare `6529 install`
with `./bin/6529 install` (or move the `./bin/6529 bootstrap` / PATH bootstrap
step ahead of the bare command) and ensure the `npm install --global sfw`,
`corepack enable pnpm`, `corepack prepare pnpm@10.33.0 --activate` block appears
before any use of `6529`; also update the explanatory sentence to "If you want
plain `6529 ...` commands to work without `direnv`, run: `./bin/6529 bootstrap`"
so it no longer references "server shells".

In `@docs/developer/pnpm-socket-firewall-migration-overview.txt`:
- Around line 119-125: The docs assume the shim is on PATH for step 5; update
the installation instructions to explicitly use the bundled shim when running
the first install by changing references to run ./bin/6529 (e.g., ./bin/6529
install) instead of just 6529, and clarify that after running ./bin/6529
bootstrap (or sourcing the printed export) future shells can use the shorthand
6529 once the shim is on PATH; update the text around the existing ./bin/6529
bootstrap and the “6529 install” line to reflect this explicit usage.

---

Outside diff comments:
In `@dev-setup/run-setup.sh`:
- Around line 104-141: The script fails when repo-local wrappers in bin/ shadow
real package managers; update ensure_node_ge20 (and any places calling npm/pnpm,
e.g., npm -v, pnpm -v, npm install --global sfw) to resolve the real binary path
first (use command -v -a or which -a), filter out the repo's ./bin paths (e.g.,
entries containing "$PWD/bin" or the repo root/bin), and then invoke the first
remaining absolute path (store in a variable like REAL_NPM or REAL_PNPM) instead
of calling npm/pnpm directly; if no external binary is found, print an
actionable error and exit.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 40e73a6b-afe4-48d3-a7da-99990f3a59d1

📥 Commits

Reviewing files that changed from the base of the PR and between c20a14a and f206fb7.

📒 Files selected for processing (9)
  • .gitattributes
  • .github/workflows/build-upload-deploy-prod.yml
  • README.md
  • bin/6529
  • dev-setup/run-setup.sh
  • docs/developer/pnpm-and-socket-firewall.md
  • docs/developer/pnpm-socket-firewall-migration-overview.txt
  • scripts/dev-open.cjs
  • scripts/enforce-package-manager.cjs
✅ Files skipped from review due to trivial changes (2)
  • .gitattributes
  • scripts/dev-open.cjs
🚧 Files skipped from review as they are similar to previous changes (2)
  • scripts/enforce-package-manager.cjs
  • README.md

Comment thread bin/6529 Outdated
Comment thread docs/developer/pnpm-and-socket-firewall.md Outdated
Comment thread docs/developer/pnpm-socket-firewall-migration-overview.txt Outdated
prxt6529 added 2 commits April 6, 2026 11:16
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
prxt6529 added 27 commits April 6, 2026 14:25
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Apr 7, 2026

@prxt6529 prxt6529 merged commit c11f6fc into main Apr 7, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants