Skip to content

chore(web): stop tracking Next build output and enforce repo hygiene - #865

Merged
pancacake merged 6 commits into
HKUDS:devfrom
evan188199-tech:codex/upstream-repo-hygiene
Aug 16, 2026
Merged

chore(web): stop tracking Next build output and enforce repo hygiene#865
pancacake merged 6 commits into
HKUDS:devfrom
evan188199-tech:codex/upstream-repo-hygiene

Conversation

@evan188199-tech

@evan188199-tech evan188199-tech commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Description

Stops tracking the generated web/.next-deeptutor tree and adds guardrails that keep regenerated artifacts out of Git.

  • Removes the tracked Next build output from the index while retaining the custom build directory at runtime.
  • Adds a repository hygiene check for tracked build outputs, caches, reports, and common generated artifacts.
  • Runs repository/workspace hygiene in CI for pushes and PRs targeting main or dev.
  • Runs repository hygiene from pre-commit and explains the clean primary-checkout / feature-worktree workflow in CONTRIBUTING.md.
  • Adds a dependency-free local pre-commit hook that also blocks accidental direct commits on main unless explicitly allowed.
  • Updates the web build wrapper to regenerate required checked-in inputs while restoring them after build.
  • Adds tests for workspace hygiene, branch policy, wrapper routing, and restoration behavior.

This also removes the repository-wide pre-commit blocker reported on #728: formatting hooks currently attempt to rewrite tracked Next build files, so contributors cannot run pre-commit run --all-files successfully.

Related Issues

Module(s) Affected

  • agents
  • api
  • config
  • core
  • knowledge
  • logging
  • services
  • tools
  • utils
  • web (Frontend)
  • docs (Documentation)
  • scripts (Scripts)
  • tests (Tests)
  • Other: ...

Checklist

  • I have read and followed the contribution guidelines.
  • My code follows the project's coding standards.
  • I have run pre-commit run --all-files and fixed any issues.
  • I have added relevant tests for my changes.
  • I have updated the documentation (if necessary).
  • My changes do not introduce any new security vulnerabilities.

Validation

  • python scripts/check_repo_hygiene.py: PASS
  • python scripts/check_workspace_hygiene.py: PASS
  • python -m pytest tests/scripts/test_branch_policy.py tests/scripts/test_workspace_hygiene.py: 6 passed
  • python -m ruff check changed Python scripts/tests: PASS
  • python -m ruff format --check changed Python scripts/tests: PASS
  • .github/workflows/repository-hygiene.yml YAML parse: PASS
  • git diff --check: PASS
  • npm run test:node: 412 passed, 1 pre-existing failure (ordinary users can edit only their owner-scoped Codex reasoning overrides), reproduced on unmodified origin/dev
  • npm run lint: PASS, 56 pre-existing warnings
  • npm run build: PASS
  • git status --short after build: clean
  • Full repository pre-commit was not run in this local environment; the changed-file checks above all passed.

@pancacake
pancacake merged commit 920ebc8 into HKUDS:dev Aug 16, 2026
5 of 7 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.

2 participants