Skip to content

Fix cli syntax error tests - #159

Open
kashvipeehu24 wants to merge 4 commits into
DevilsAutumn:mainfrom
kashvipeehu24:fix-cli-syntax-error-tests
Open

Fix cli syntax error tests#159
kashvipeehu24 wants to merge 4 commits into
DevilsAutumn:mainfrom
kashvipeehu24:fix-cli-syntax-error-tests

Conversation

@kashvipeehu24

@kashvipeehu24 kashvipeehu24 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Added validation for manually maintained reference pages.
  • Detects missing documented symbols by comparing generated output with manual documentation.
  • Raises a clear error when a manual reference page is out of sync.

Contributor Checklist

  • The linked issue was accepted before I started.
  • I tested my changes locally.
  • I followed the project's contribution guidelines.

@greptile-apps

greptile-apps Bot commented Jun 27, 2026

Copy link
Copy Markdown

Greptile Summary

This PR updates reference generation checks and the developer changelog. The main changes are:

  • Manual reference validation now receives the package object.
  • Manual pages are checked for documented public symbols.
  • The changelog notes CLI syntax error formatting improvements.

Confidence Score: 4/5

The reference validation path can still allow stale manual documentation to pass, so the change needs attention before merging.

The touched area is small and the issue is localized to manual reference freshness checks.

scripts/generate_reference.py

T-Rex T-Rex Logs

What T-Rex did

  • I ran a focused Python harness that monkeypatched the reference directory and page list, wrote manual files with a stale signature anchor, and then called render_reference and check_outputs.
  • The harness run finished with no generated renderers invoked, check_outputs returning 0, and the application page still displaying the stale signature instead of the live generated one.
  • Before the artifact, the base commit raised a SystemExit about missing RouteGroup documentation, and after the artifact the head commit raised the same missing-symbol error.
  • Evidence for these findings is captured in the shared-stem text artifacts under trex-artifacts, which support the missing-symbol assertions.

View all artifacts

T-Rex Ran code and verified through T-Rex

Fix All in Codex Fix All in Claude Code

Reviews (3): Last reviewed commit: "Merge branch 'main' into fix-cli-syntax-..." | Re-trigger Greptile

def read_manual_reference(
package: Any,
public_api: tuple[str, ...],
pages_by_symbol: Mapping[str, ReferencePage],

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 Manual Pages Skip Generation Check

When a manual reference page contains a public symbol name but its generated reference block is stale or incomplete, this path still returns the manual output successfully. The new package argument is not used to render or compare generated output, so out-of-sync manual pages can pass instead of raising the intended error.

Artifacts

Repro: generated script with temporary stale manual reference fixture and validation invocation

  • Contains supporting evidence from the run (text/x-python; charset=utf-8).

Repro: runtime output showing stale manual page accepted with exit code 0

  • Keeps the command output available without making the summary code-heavy.

View artifacts

T-Rex Ran code and verified through T-Rex

Fix in Codex Fix in Claude Code



def read_manual_reference(
package: Any,

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 Manual Freshness Check Still Skips

When a manual reference page contains each public symbol name but its generated API block is stale, this path still returns the manual output successfully. package is now passed into read_manual_reference, but the function does not use it to render and compare the generated reference content, so out-of-sync manual pages can still pass validation.

Artifacts

Repro: focused Python harness with stale manual reference fixture

  • Contains supporting evidence from the run (text/x-python; charset=utf-8).

Repro: harness output showing stale manual content was accepted

  • Keeps the command output available without making the summary code-heavy.

View artifacts

T-Rex Ran code and verified through T-Rex

Fix in Codex Fix in Claude Code

@kashvipeehu24

Copy link
Copy Markdown
Contributor Author

Hi! This PR is ready for review whenever you have a chance. Thank you!

@DevilsAutumn

DevilsAutumn commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Hi @kashvipeehu24 , I think there is some confusion, I don't see any valid issue for this PR. Issue #136 mentioned in description is a PR not issue.

Can you please check what happened?

@@ -782,6 +782,7 @@ def render_reference(


def read_manual_reference(

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 Manual Freshness Still Skips

When a manual reference page keeps all symbol headings but has stale generated details, this function still returns the manual output without comparing it to live generated content. The new package argument is unused, so render_reference skips the generated renderers and the reference check can pass with stale signatures, defaults, or field tables.

Artifacts

Repro: focused harness with stale manual reference content and monkeypatched live renderers

  • Contains supporting evidence from the run (text/x-python; charset=utf-8).

Repro: command output showing stale manual content is accepted and generated renderers are skipped

  • Keeps the command output available without making the summary code-heavy.

View artifacts

T-Rex Ran code and verified through T-Rex

Fix in Codex Fix in Claude Code

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