Skip to content

Reject equivalent Production URLs in tutorial readiness - #2

Merged
RaychevAngel merged 2 commits into
mainfrom
codex/tutorial-readiness-20260926
Sep 27, 2026
Merged

RaychevAngel merged 2 commits into
mainfrom
codex/tutorial-readiness-20260926

Conversation

@RaychevAngel

@RaychevAngel RaychevAngel commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

Change

Compare the parsed hostname rather than the literal URL. Reject Production host variants, malformed URLs, credentials in URLs, query strings and fragments before profile validation. The helper remains read-only and still requires explicit provisioned-context confirmation; it does not claim that an arbitrary endpoint is an authorized Dev account.

Proof

The new regression test first failed on seven cases, including the known Production host with :443 and a trailing DNS dot. The complete offline suite now passes (46 tests). No network or paid work is used by these tests. Both example copies match. Task, profile, plan and scoring bytes are unchanged.

Publish as a new immutable release; preserve the existing release and receipts.

Summary by CodeRabbit

  • Bug Fixes
    • Setup checks now provide installation guidance when the Synth CLI is missing.
    • API endpoint validation now rejects malformed or unsafe URLs, including non-HTTPS addresses, production endpoints, URLs with credentials or query components, and port 0. These checks also handle hostname case and trailing dots consistently, and treat parsing errors as unsafe.

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Essentials

Run ID: 1bfccf4e-edb2-4fee-af0a-b6936507caf0

📥 Commits

Reviewing files that changed from the base of the PR and between aae197c and 3691fc9.

📒 Files selected for processing (3)
  • examples/review-lab/check_setup.py
  • examples/review-permissions/check_setup.py
  • scripts/test_setup.py

Included review availability: This review used your included allowance. 1 included review remains after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


📝 Walkthrough

Walkthrough

Both setup scripts now report a missing Synth CLI with installation guidance and validate API endpoint URLs using parsed URL properties. Tests cover the missing CLI error and rejected endpoint forms.

Changes

Setup check validation

Layer / File(s) Summary
Missing CLI handling
examples/review-lab/check_setup.py, examples/review-permissions/check_setup.py, scripts/test_setup.py
Both setup scripts convert a missing Synth executable into a ValueError with installation guidance. A test checks the error.
Endpoint URL validation
examples/review-lab/check_setup.py, examples/review-permissions/check_setup.py, scripts/test_setup.py
Both setup scripts reject non-HTTPS or hostless URLs, production host variants, credentials, query strings, fragments, port 0, and URL parsing errors. Tests cover rejected endpoint forms.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 3691f

No actionable issue is established in the setup checks. The change is mergeable after normal checks.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: rejecting equivalent Production URLs during tutorial readiness validation.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@RaychevAngel

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@RaychevAngel

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Head commit changed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@RaychevAngel

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@RaychevAngel
RaychevAngel merged commit 83c31b8 into main Sep 27, 2026
3 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.

1 participant