GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(lab-ops-hub): return IP literals in canonical form in the container validator by dezren39 · Pull Request #638 · developing-today/code

Conversation

@dezren39

@dezren39 dezren39 commented Oct 23, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Fixes #637

The container validator judged IP literals correctly but returned the caller's spelling verbatim (inet_aton IPv4 forms like 134744072, 1.2.256, 010.0.0.010; expanded/uppercase IPv6). The Worker returns the WHATWG-canonical form. The IP-literal success path now returns _url_with_host(u, str(ip)) — the canonical dotted quad / compressed lowercase IPv6 of the address that was judged — matching validateCrawlUrl return-for-return on the #637 probe table, including IPv4-mapped forms ([::ffff:8.8.8.8] → [::ffff:808:808]).

Tests: new test_returns_ip_literals_in_canonical_form (11 cases incl. userinfo+port preservation); two pre-existing verbatim pins updated to the canonical expectation (integer-spelling accept case, IPv4-mapped dotted spelling). Python suite: 51/51 pass. Differential probe vs the Worker validator: all IP-literal diffs eliminated; verdicts unchanged everywhere.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Summary by CodeRabbit

  • Bug Fixes
    • URLs containing public IP addresses are now returned in a consistent canonical form, including normalized IPv4 and IPv6 spellings. User information and port numbers are preserved where present.
    • This covers alternate representations such as integer, hexadecimal, octal, abbreviated, and expanded IP addresses.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
Muse Sweep
fix(lab-ops-hub): return IP literals in canonical form in the contain…
fecc932
…er validator (#637)
@dezren39
dezren39 requested a review from a team as a code owner October 23, 2026 02:18
@github-actions github-actions Bot assigned dezren39 Oct 23, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-23T02:33:16.800989Z 746769c New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5d8371af-09cf-4eec-b247-84b9980d1054
📥 Commits

Reviewing files that changed from the base of the PR and between fecc932 and 746769c.

📒 Files selected for processing: 1
  • pkgs/lab-ops-hub/container/app.py

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: da306b4d-e066-4d30-b5db-164dac651beb
📥 Commits

Reviewing files that changed from the base of the PR and between 5a84351 and fecc932.

📒 Files selected for processing: 2
  • pkgs/lab-ops-hub/container/app.py
  • pkgs/lab-ops-hub/test/test_container_validate.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

validate_crawl_url now returns accepted IP-literal URLs with the parsed address in canonical form. Tests cover noncanonical IPv4 and IPv6 spellings and verify that userinfo and port are preserved.

Changes: IP URL canonicalization

Layer / File(s) Summary
Canonicalize accepted IP-literal URLs
pkgs/lab-ops-hub/container/app.py, pkgs/lab-ops-hub/test/test_container_validate.py
After public-address checks, validate_crawl_url replaces the URL host with str(ip). Tests check canonical IPv4 and IPv6 returns, including preserved userinfo and port. The translation-prefix test checks the canonical IPv6 form.

Priority: ⬇️ Low

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

Change: Bug fix

Merge Risk: ⚪ Minimal · up to fecc9

The canonical IP return change is ready to merge after normal checks.

Pre-merge checks: Passed 4 · Failed 1

Failed 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 7 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: returning IP literals in canonical form from the container validator.
Linked Issues check Passed Issue #637 requires canonical returned forms for accepted IP literals, unchanged verdicts, regression tests, a passing Python suite, and no TypeScript changes. The diff changes the successful IP-liter…
Out of Scope Changes check Passed The whole-PR diff contains changes only in pkgs/lab-ops-hub/container/app.py and its Python test file. The implementation changes only the successful IP-literal return path. The tests directly verif…
Full details: Linked Issues check

Explanation

Issue #637 requires canonical returned forms for accepted IP literals, unchanged verdicts, regression tests, a passing Python suite, and no TypeScript changes. The diff changes the successful IP-literal path to call _url_with_host(u, str(ip)), which produces canonical IPv4 and IPv6 forms while preserving URL components. The added test covers 11 IPv4 and IPv6 cases, including userinfo, port, and IPv4-mapped IPv6 input. The PR reports 51/51 Python tests passing, unchanged verdicts, and no TypeScript changes.

Full details: Out of Scope Changes check

Explanation

The whole-PR diff contains changes only in pkgs/lab-ops-hub/container/app.py and its Python test file. The implementation changes only the successful IP-literal return path. The tests directly verify issue #637 canonical-return behavior. No DNS-name behavior or unrelated TypeScript code changes are present.

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 23, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

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: fecc932909

ℹ️ 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".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread pkgs/lab-ops-hub/container/app.py Outdated
# spelling. (A percent-decoded host is likewise fetched in its
# decoded form, #529.) _url_with_host re-adds the brackets for
# an IPv6 literal.
return _url_with_encoded_components(_url_with_host(u, str(ip)))

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 23, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

P1 Badge Serialize mapped IPv6 independently of Python's display form

On the declared python:3.13-alpine runtime, str(ipaddress.ip_address("::ffff:8.8.8.8")) returns ::ffff:8.8.8.8, not the WHATWG form ::ffff:808:808. Consequently this new path leaves mapped literals noncanonical and the added assertion in test_judges_translation_prefixes_by_embedded_ipv4 fails under Python 3.13 (and 3.14), while Node's URL serializer returns the expected hex form. IPv4-mapped IPv6 addresses need an explicit hextet-based serialization rather than str(ip).

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Muse Sweep
fix(lab-ops-hub): render canonical IPv6 from exploded hextets, not st…
29740bd
…r() (#637)
@dezren39

dezren39 commented Oct 23, 2026

Copy link
Copy Markdown
Member Author

Follow-up commit: CI (Python 3.12.15) rendered str(IPv6Address) for an IPv4-mapped address as ::ffff:8.8.8.8 while this sandbox's Python 3.12.3 and the Worker's serializer both give hextets ::ffff:808:808 — str() is patch-version-unstable for mapped addresses. The fix now renders IPv6 via a small _canonical_ipv6 (exploded hextets + longest-zero-run compression), verified against node's URL serializer on mapped/6to4/NAT64/compression edge cases; 51/51 Python tests pass locally.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Muse Sweep
fix(lab-ops-hub): derive canonical IPv6 hextets from the address inte…
746769c
…ger (#637)
@dezren39
dezren39 merged commit 9298c5f into main Oct 23, 2026
5 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 deleted the creator/637-canonical-ip-literal branch October 23, 2026 02:31
@dezren39 dezren39 mentioned this pull request Nov 21, 2026
Closure audit: every closed issue/PR verified; unmerged branches + unpushed worktrees inventoried #7079
Open
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 24, 2026
lab-ops-hub: container validator returns IP literals un-canonicalized — inet_aton spellings and expanded IPv6 kept verbatim, Worker returns the canonical address #637
Closed
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 2 — Closed-Issues Review (past month, since 2026-10-23) #13878
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@dezren39 dezren39

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

lab-ops-hub: container validator returns IP literals un-canonicalized — inet_aton spellings and expanded IPv6 kept verbatim, Worker returns the canonical address

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.