Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.

ci: ignore test files in line gate and raise frontend limit to 500 - #95

Closed
CJackHwang wants to merge 1 commit into
devfrom
codex/update-ci-line-count-limits
Closed

CJackHwang wants to merge 1 commit into
devfrom
codex/update-ci-line-count-limits

Conversation

@CJackHwang

Copy link
Copy Markdown
Owner

Motivation

  • The refactor line-count gate should not block changes to test files, so test files must be excluded from the check.
  • Frontend source (webui/) requires a more permissive line limit than backend production files.
  • Keep entry/facade files with a stricter upper bound to encourage small surface files.

Description

  • Added FRONTEND_MAX=500 and is_frontend_file to tests/scripts/check-refactor-line-gate.sh so webui/* files use a 500-line threshold.
  • Added is_test_file to detect and skip test files (matches tests/, */tests/*, */__tests__/*, *_test.go, and common *.test.* patterns) in the gate script.
  • Updated script logic to skip test files during scanning and to apply frontend/entry limits in the correct order (webui/ -> frontend limit, entry files -> 120 limit, otherwise backend default 300).
  • Synchronized documentation and targets header comments in plans/refactor-line-gate.md and plans/refactor-line-gate-targets.txt to state backend 300, frontend 500, and that tests are ignored.

Testing

  • Ran the gate script ./tests/scripts/check-refactor-line-gate.sh and it completed successfully with checked=130 missing=0 over_limit=0.

Codex Task

@vercel

vercel Bot commented Mar 16, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
ds2api Ready Ready Preview, Comment Mar 16, 2026 2:59pm

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94578b691b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +74 to +76
if is_frontend_file "$file"; then
limit="$FRONTEND_MAX"
elif is_entry_file "$file"; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Apply entry/facade limit before frontend limit

This ordering makes every webui/* entry file in is_entry_file use the 500-line frontend cap instead of the intended 120-line entry/facade cap. For example, webui/src/App.jsx now matches is_frontend_file first and never reaches the is_entry_file branch, which weakens the gate for the exact files meant to stay strict and contradicts the documented “Entry/facade limit: 120 lines.”

Useful? React with 👍 / 👎.

@CJackHwang CJackHwang closed this Mar 16, 2026
@CJackHwang
CJackHwang deleted the codex/update-ci-line-count-limits branch March 19, 2026 18:57

This branch was successfully deployed

1 active deployment
Preview — 94578b69 Deployed Mar 16, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant