Skip to content

Add minimal root npm wrapper#86

Merged
ProfRandom92 merged 1 commit into
mainfrom
codex/add-minimal-root-npm-wrapper-for-comptextv7
May 15, 2026
Merged

Add minimal root npm wrapper#86
ProfRandom92 merged 1 commit into
mainfrom
codex/add-minimal-root-npm-wrapper-for-comptextv7

Conversation

@ProfRandom92
Copy link
Copy Markdown
Owner

Motivation

  • Provide a tiny, reviewer-friendly root package.json so common root npm commands work and delegate to the real app directories without changing dependency management.
  • Ensure repository layout validation treats the root wrapper as expected and remove the previous ENOENT/unexpected root package.json behavior.
  • Keep the change minimal and stabilization-only with no new dependencies, workspaces, or runtime code changes.

Description

  • Added package.json at the repository root named comptextv7-root with scripts that delegate to the apps using npm --prefix and run Python tests with pytest.
  • Updated scripts/check_repo_layout.py to include the root package.json in REQUIRED_FILES and removed the old error that flagged an existing root package as unexpected.
  • Updated tests/test_check_repo_layout.py to assert the presence of the root and app package.json files before asserting check_repo_layout() returns [].
  • Revised documentation in docs/validation.md, README.md, docs/AGENT_WORKFLOW.md, and docs/BENCHMARK_INTEGRATION.md to document the root wrapper commands and clarify that app dependencies remain in dashboard/app and showcase/app.

Testing

  • Ran python scripts/check_repo_layout.py, which printed repository layout OK (success).
  • Ran pytest tests/test_check_repo_layout.py -q, which passed (1 passed).
  • Ran the full test suite with pytest -q, which completed successfully (52 passed).
  • Executed root wrapper npm scripts npm run layout, npm run typecheck, npm run validate, npm run build, npm test, and npm run check, and each command completed successfully (builds and typechecks for both apps completed and Python tests passed).

Codex Task

@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for comptext-v7 canceled.

Name Link
🔨 Latest commit b9f11b9
🔍 Latest deploy log https://app.netlify.com/projects/comptext-v7/deploys/6a076bae6dbfdc000841ff85

@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
comptextv7 Ready Ready Preview, Comment May 15, 2026 6:53pm

@ProfRandom92 ProfRandom92 merged commit b606b9d into main May 15, 2026
7 of 10 checks passed
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a root-level package.json that serves as a command wrapper, delegating validation tasks to the dashboard and showcase applications via npm --prefix and running Python tests with pytest. Documentation across the repository has been updated to reflect this new workflow. Feedback includes a suggestion to centralize command documentation to avoid duplication, an optimization for the check script to provide faster feedback by reordering tasks, and the removal of redundant assertions in the repository layout tests.

Comment thread README.md
Comment on lines +231 to 241
Root wrapper checks:

```bash
npm run layout
npm run typecheck
npm run validate
npm run build
npm test
npm run check
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To avoid duplicating documentation, consider removing this list of commands from README.md. The preceding sentence already directs users to docs/validation.md for validation commands, and that file now contains a comprehensive explanation of these root wrapper scripts. Centralizing this information makes it easier to maintain.

Comment thread package.json
"test:core": "pytest tests/test_core_foundation_ts.py -q",
"test:replay": "pytest tests/test_paper_replay_bench.py tests/test_agent_trace_replay.py tests/test_replay_continuity.py -q",
"layout": "python scripts/check_repo_layout.py",
"check": "npm run layout && npm run typecheck && npm run validate && npm run build && npm run test"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The Python tests run by npm test are likely independent of the frontend typecheck, validate, and build steps. Running the Python tests earlier in the check script can provide faster feedback if they fail, as you won't have to wait for the frontend checks to complete.

Suggested change
"check": "npm run layout && npm run typecheck && npm run validate && npm run build && npm run test"
"check": "npm run layout && npm run test && npm run typecheck && npm run validate && npm run build"

Comment on lines +5 to +7
assert (REPO_ROOT / "package.json").is_file()
assert (REPO_ROOT / "dashboard" / "app" / "package.json").is_file()
assert (REPO_ROOT / "showcase" / "app" / "package.json").is_file()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

These assertions are redundant. The check_repo_layout() function already verifies the existence of these files. If any of them are missing, check_repo_layout() will return a list of errors, and the subsequent assert check_repo_layout() == [] will fail with a more descriptive message about what the function under test reported. It's better to rely on the function's output for the assertion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant