Skip to content

Clarify repository validation layout#85

Merged
ProfRandom92 merged 1 commit into
mainfrom
codex/update-validation-documentation-and-scripts
May 15, 2026
Merged

Clarify repository validation layout#85
ProfRandom92 merged 1 commit into
mainfrom
codex/update-validation-documentation-and-scripts

Conversation

@ProfRandom92
Copy link
Copy Markdown
Owner

Motivation

  • Make validation commands unambiguous for the current multi-app repo layout where the root intentionally has no package.json.
  • Prevent reviewers from running invalid root-level npm commands that produce ENOENT errors and be clear which surface (dashboard, showcase, Python tests) owns each validation step.
  • Provide a lightweight, low-risk guard to assert the expected layout and committed benchmark artifacts.

Description

  • Added docs/validation.md documenting the repository layout, exact validation commands for dashboard/app, showcase/app, and Python tests, and an explicit note that root npm commands are invalid.
  • Updated README.md, docs/AGENT_WORKFLOW.md, and docs/BENCHMARK_INTEGRATION.md to point to the new validation guide and to replace ambiguous root npm instructions with layout-specific commands.
  • Added a small, dependency-free guard script scripts/check_repo_layout.py that verifies dashboard/app/package.json, showcase/app/package.json, and key artifacts under artifacts/, and also flags an unexpected root package.json.
  • Added tests/test_check_repo_layout.py to cover the guard script via pytest and kept all changes documentation/validation-only without altering runtime logic, assets, or architecture.

Testing

  • Ran python scripts/check_repo_layout.py and it printed repository layout OK (exit 0).
  • Ran pytest tests/test_check_repo_layout.py -q and it passed (1 passed).
  • Ran the full Python test suite with pytest -q and it passed (52 passed).
  • Built the dashboard with (cd dashboard/app && npm run typecheck && npm run build) and the commands completed successfully.
  • Built the showcase with (cd showcase/app && npm run typecheck && npm run validate && npm run build) and the commands completed successfully.

Codex Task

@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:40pm

@netlify
Copy link
Copy Markdown

netlify Bot commented May 15, 2026

Deploy Preview for comptext-v7 canceled.

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

@ProfRandom92 ProfRandom92 merged commit 42e803f into main May 15, 2026
8 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 formalizes the repository's multi-app layout by introducing a dedicated validation guide and a layout verification script. It updates existing documentation to clarify that validation commands are layout-specific, specifically moving away from root-level npm commands. Review feedback suggests enhancing the documentation's layout overview for consistency with the README and improving the layout check script by adding a shebang line and directing error messages to stderr.

Comment thread docs/validation.md
Comment on lines +10 to +16
Comptextv7/
├── dashboard/app/ # Vite + TypeScript dashboard application
├── showcase/app/ # Vite + TypeScript showcase application
├── tests/ # Python regression, replay, and foundation tests
├── scripts/ # Python validation and repository utility scripts
├── artifacts/ # Committed deterministic replay artifacts
└── docs/ # Reviewer and validation documentation
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

For completeness and consistency with the repository map in README.md, consider including the src/ and reports/ directories in this layout overview. These directories are central to the code being validated and the storage of validation artifacts.

Suggested change
Comptextv7/
├── dashboard/app/ # Vite + TypeScript dashboard application
├── showcase/app/ # Vite + TypeScript showcase application
├── tests/ # Python regression, replay, and foundation tests
├── scripts/ # Python validation and repository utility scripts
├── artifacts/ # Committed deterministic replay artifacts
└── docs/ # Reviewer and validation documentation
Comptextv7/
├── dashboard/app/ # Vite + TypeScript dashboard application
├── showcase/app/ # Vite + TypeScript showcase application
├── src/ # KVTC engine and validation modules
├── tests/ # Python regression, replay, and foundation tests
├── scripts/ # Python validation and repository utility scripts
├── reports/ # Validation and continuity reports
├── artifacts/ # Committed deterministic replay artifacts
└── docs/ # Reviewer and validation documentation

Comment on lines +1 to +11
"""Validate the expected multi-app repository layout.

The repository root intentionally has no package.json. Dashboard and showcase
Node commands belong to their app directories.
"""

from __future__ import annotations

from pathlib import Path

REPO_ROOT = Path(__file__).resolve().parents[1]
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

It is a best practice to include a shebang line for scripts intended to be executed directly. Additionally, importing sys will allow for better error reporting to stderr in the main function.

#!/usr/bin/env python3
"""Validate the expected multi-app repository layout.

The repository root intentionally has no package.json. Dashboard and showcase
Node commands belong to their app directories.
"""

from __future__ import annotations

import sys
from pathlib import Path

REPO_ROOT = Path(__file__).resolve().parents[1]

Comment on lines +35 to +43
def main() -> int:
errors = check_repo_layout()
if errors:
for error in errors:
print(error)
return 1

print("repository layout OK")
return 0
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

Error messages should ideally be printed to sys.stderr to distinguish them from standard output in CI/CD environments and shell pipelines.

Suggested change
def main() -> int:
errors = check_repo_layout()
if errors:
for error in errors:
print(error)
return 1
print("repository layout OK")
return 0
def main() -> int:
errors = check_repo_layout()
if errors:
for error in errors:
print(error, file=sys.stderr)
return 1
print("repository layout OK")
return 0

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