Repository navigation
Complete the evaluate and correct loop - #7
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cae537871e
ℹ️ 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".
| const pixelThreshold = integer(options.pixelThreshold ?? DEFAULTS.pixelThreshold, "pixel threshold", 0, 255); | ||
| const maxComparePixels = integer(options.maxComparePixels ?? DEFAULTS.maxComparePixels, "maximum comparison pixels", 100_000, 25_000_000); | ||
| const candidateInput = await assertAllowedUrl(candidateBaseUrl, { allowPrivateNetwork }); | ||
| const candidateBase = new URL("/", candidateInput); |
There was a problem hiding this comment.
Preserve candidate URL path prefixes
When --candidate includes a path prefix (for example a preview served at http://host/preview/), this resets the base to the origin root before route construction, so recorded routes are evaluated at http://host/<route> instead of under /preview/<route>. That makes otherwise valid candidates served from a subdirectory fail or score the wrong application; keep the base pathname when joining it with each recorded route.
Useful? React with 👍 / 👎.
| } | ||
|
|
||
| function artifactName(screenId) { | ||
| return String(screenId).toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-|-$/g, "").slice(0, 120) || "screen"; |
There was a problem hiding this comment.
Make evaluation artifact names collision-free
Valid AppSpec screen ids can collapse to the same sanitized name here, such as screen:pricing and screen-pricing (or ids sharing the same first 120 sanitized characters). In that case the later writes to candidate/screenshots/${name}.png, candidate/pages/${name}.json, and diffs/${name}.png overwrite the first route's artifacts, leaving multiple routes in evaluation.json and the manifest pointing at the same last-written files.
Useful? React with 👍 / 👎.
Reconstruct 0.4 adds candidate rendering, visual heatmaps, observable structure and navigation scoring, machine-readable evaluation results, prioritized correction plans, agent fix prompts, integrity manifests, documentation, and real Chromium regression coverage.