Compressed IPv6 text
Hexora is a Windows coding workspace where an AI conversation can stay close to the address-formatting code under review. Ask a compatible model about IPv6 examples, then check the handling of zone identifiers and empty input yourself.
from ipaddress import IPv6Address
def ipv6_text(text):
if type(text) is not str or not text or ":" not in text:
raise ValueError("ipv6.input")
if "%" in text or text.strip() != text:
raise ValueError("ipv6.scope")
return IPv6Address(text).compressedConnection
Base URL, credentials and a reachable server.
Project
Test tied zero runs and an embedded IPv4 tail, rejecting zone identifiers, surrounding whitespace and malformed or empty input.
Review before applying
Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.
from ipaddress import IPv6Address
def ipv6_text(text):
if type(text) is not str or not text or ":" not in text:
raise ValueError("ipv6.input")
if "%" in text or text.strip() != text:
raise ValueError("ipv6.scope")
return IPv6Address(text).compressedKeep address formatting consistent across the application
Address text often crosses forms, configuration files and stored records before software uses it. Hexora gives you a Windows AI coding workspace for reviewing that journey in your own project. Select the relevant files and ask the connected model to identify where validation ends and formatting begins, using examples that reflect what your application actually accepts.
An IPv6 formatting task offers a specific starting point. Describe the required output and decide whether surrounding whitespace or zone identifiers belong in the accepted input. Ask the assistant to inspect the existing library calls before suggesting custom logic. Keeping those choices explicit helps a reviewer distinguish a deliberate rejection from an unintended change to a previously accepted address.
Review the proposal through its callers and run fixtures covering ordinary addresses, competing zero runs and malformed input. Compare exact output strings as well as error behavior, so the change can be assessed wherever the result is stored or displayed. Hexora supports OpenAI-compatible or Anthropic endpoint connections with credentials as required. An unfiltered model may be selected if the endpoint provides one; its context and tool support remain server-dependent. The assistant's role is to help develop a checkable patch, with your application requirements determining whether it belongs.
Address-formatting review questions
- Should surrounding spaces be trimmed automatically?
That depends on the accepted-input contract. The illustrated routine rejects them. If you want trimming elsewhere, identify that boundary explicitly and check callers so a convenience change does not silently broaden the formatter's responsibilities or accepted values.
- What should I establish about zone identifiers?
Decide whether scoped addresses are meaningful for this application path. The example keeps them outside its accepted input. Ask the assistant to preserve that rule unless the task explicitly includes a reviewed change to scoped-address handling.
- Why test addresses with equal-length zero runs?
They help verify that the proposed formatting follows the selected library's convention consistently. Compare the exact output with your expected representation, particularly when formatted values become keys, stored text or part of a visible configuration diff.
- Does formatting confirm an address is reachable?
No. This task concerns accepted syntax and textual representation. Reachability depends on a separate network operation and environment. Keep that distinction in the application so a normalized string is not presented as evidence of a successful connection.
Hexora · Updated 2026-10-25