Skip to content

Add E2E registry fixture for hello-world installs - #41

Merged
sak0a merged 2 commits into
masterfrom
harden-cs2-modframework-extension
May 5, 2026
Merged

sak0a merged 2 commits into
masterfrom
harden-cs2-modframework-extension

Conversation

@sak0a

@sak0a sak0a commented May 5, 2026

Copy link
Copy Markdown
Owner

Summary

  • Added an E2E registry fixture that serves the packaged hello-world example from public/notur/e2e-registry and writes a cached registry response for archive-backed installs.
  • Updated the panel setup script to populate the fixture and point installs at a deterministic local archive with a matching SHA-256 checksum.
  • Added Composer test scripts and refreshed dependency metadata/checksums required for the updated build and test flow.

Testing

  • Not run.
  • Fixture setup verified in docker/e2e/setup-panel.sh to create public/notur/e2e-registry/hello-world.notur and storage/notur/registry-cache.json.
  • Registry payload includes the expected archive_url and sha256 fields for the hello-world extension.

- Package the hello-world example for archive-backed setup
- Seed panel registry cache for deterministic install tests
- Add Composer test scripts and refresh lock metadata
@coderabbitai

coderabbitai Bot commented May 5, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@sak0a has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 36 minutes and 50 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c0ba7529-0c08-4242-b3db-8b4eb55cef6d

📥 Commits

Reviewing files that changed from the base of the PR and between 4c2e9ef and 3ae1adb.

⛔ Files ignored due to path filters (4)
  • composer.lock is excluded by !**/*.lock
  • examples/hello-world/package-lock.json is excluded by !**/package-lock.json
  • extensions/cs2-modframework/resources/frontend/dist/cs2-modframework.js is excluded by !**/dist/**
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (21)
  • composer.json
  • docker/e2e/setup-panel.sh
  • extensions/cs2-modframework/resources/frontend/src/api/useModFramework.ts
  • extensions/cs2-modframework/resources/frontend/src/components/FrameworkCard.tsx
  • extensions/cs2-modframework/resources/frontend/src/components/ModFrameworkPage.tsx
  • extensions/cs2-modframework/resources/frontend/src/index.tsx
  • extensions/cs2-modframework/src/Controllers/ModFrameworkController.php
  • extensions/cs2-modframework/src/Services/FrameworkInstaller.php
  • extensions/cs2-modframework/src/Services/GameInfoModifier.php
  • extensions/cs2-modframework/src/Services/GitHubReleaseResolver.php
  • extensions/cs2-modframework/src/Services/ServerEligibility.php
  • extensions/cs2-modframework/src/routes/api-client.php
  • package.json
  • test.txt.rej
  • tests/E2E/browser/notur-admin.spec.ts
  • tests/Frontend/vitest.config.js
  • tests/Integration/Http/ExtensionApiControllerTest.php
  • tests/Integration/Http/Middleware/ExtensionPermissionTest.php
  • tests/Integration/Http/Middleware/VerifyServerAccessTest.php
  • tests/Unit/Cs2Modframework/GameInfoModifierTest.php
  • tests/Unit/Cs2Modframework/RouteDefinitionTest.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch harden-cs2-modframework-extension

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.

@augmentcode

augmentcode Bot commented May 5, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR adds an E2E “local registry” fixture to make hello-world installs deterministic in browser-based end-to-end tests.

Changes:

  • Enhances the E2E panel bootstrap script to package the examples/hello-world extension into a .notur archive.
  • Publishes that archive under public/notur/e2e-registry and writes a cached registry payload to storage/notur/registry-cache.json (including archive_url + SHA-256).
  • Extends Playwright E2E coverage to exercise client-side route navigation and installing an extension by registry ID.
  • Adds frontend coverage configuration for Vitest (v8 provider) and wires a new npm script for coverage runs.
  • Adds Composer test scripts and updates Composer metadata to reflect the project’s stability preferences.
  • Adds new PHP unit/integration tests around middleware/controller behavior and CS2 modframework helpers.

Technical Notes: Registry installs validate the downloaded archive against the seeded SHA-256 to ensure the E2E flow is reproducible.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread docker/e2e/setup-panel.sh Outdated
php -r 'require "vendor/autoload.php"; \Notur\Support\NoturArchive::pack("/tmp/hello-world-src", "/tmp/hello-world.notur");'
mkdir -p public/notur/e2e-registry storage/notur
cp /tmp/hello-world.notur public/notur/e2e-registry/hello-world.notur
php -r '$archive="/tmp/hello-world.notur"; $registry=["fetched_at"=>gmdate("Y-m-d\\TH:i:s\\Z"), "registry"=>["version"=>"1.0.0", "extensions"=>[["id"=>"notur/hello-world", "name"=>"Hello World", "description"=>"E2E registry fixture for archive-backed installs.", "version"=>"1.0.0", "archive_url"=>"http://127.0.0.1/notur/e2e-registry/hello-world.notur", "sha256"=>hash_file("sha256", $archive), "tags"=>["e2e", "fixture"]]]]]; file_put_contents("storage/notur/registry-cache.json", json_encode($registry, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . PHP_EOL);'

@augmentcode augmentcode Bot May 5, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

docker/e2e/setup-panel.sh:62 — This php -r one-liner doesn’t check whether hash_file() or file_put_contents() fails, so the script can continue with a missing/invalid registry-cache.json and cause later E2E steps to fail non-deterministically.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread checksums.json Outdated
@@ -0,0 +1,21 @@
{

@augmentcode augmentcode Bot May 5, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

checksums.json:1 — This appears to be an archive-generated checksums.json (paths like src/..., extension.yaml, etc.) committed at the repository root; is this meant to live somewhere else (e.g., within an extension) rather than being checked in here?

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

@@ -0,0 +1 @@
../acorn/bin/acorn No newline at end of file

@augmentcode augmentcode Bot May 5, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

examples/hello-world/node_modules/.bin/acorn:1 — Committing examples/hello-world/node_modules/** introduces a very large vendored dependency tree (often OS-specific symlinks), which can significantly bloat the repo and make checkouts/tests less reliable across platforms; worth double-checking this is intentional.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread docker/e2e/setup-panel.sh
rm -rf /tmp/hello-world-src /tmp/hello-world.notur
cp -R /opt/notur/examples/hello-world /tmp/hello-world-src
php -r 'require "vendor/autoload.php"; \Notur\Support\NoturArchive::pack("/tmp/hello-world-src", "/tmp/hello-world.notur");'
mkdir -p public/notur/e2e-registry storage/notur

@augmentcode augmentcode Bot May 5, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

docker/e2e/setup-panel.sh:60 — General note (not tied to this specific line): the PR includes a test.txt.rej file that looks like an accidental patch-reject artifact; I couldn’t anchor an inline comment directly on that file via the review API, but it’s worth double-checking it’s intentional to keep in the repo.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

- Replace inline PHP with error-checked registry cache generation
- Remove generated checksum and example node_modules artifacts
@sak0a
sak0a merged commit 5a298eb into master May 5, 2026
10 checks passed
@sak0a
sak0a deleted the harden-cs2-modframework-extension branch May 5, 2026 19:49
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.

1 participant