Skip to content

[Repo Assist] test(setup): expand WizardAnswerBuilder edge-case coverage#749

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/test-wizard-answer-builder-edge-cases-2026-06-12-f65d16a83025b18f
Open

[Repo Assist] test(setup): expand WizardAnswerBuilder edge-case coverage#749
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/test-wizard-answer-builder-edge-cases-2026-06-12-f65d16a83025b18f

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This is an automated PR from Repo Assist.

Summary

Adds 10 tests covering previously untested paths in WizardAnswerBuilder, which was introduced in b90ded9 (Preserve wizard option wire values).

New tests

Test What's covered
BuildWireValue_SelectFallsBackToString_WhenNoOptionMatch select type returns the raw string answer when no option matches
BuildWireValue_MultiselectSplitsCommaString_WhenOptionsEmpty multiselect falls back to SplitMultiSelect when there's no options list
BuildWireValue_MultiselectSplitsCommaString_WhenOptionNotInList multiselect falls back to split when TryResolveOptions fails
ReadOptions_ReturnsEmpty_ForNonObjectInput Non-object element (e.g. an array) returns empty list
ReadOptions_ReturnsEmpty_WhenOptionsPropertyMissing Object without an "options" property returns empty list
ReadOptions_ReturnsEmpty_WhenOptionsIsNotArray Object with a non-array "options" value returns empty list
ValueKeys_ReturnsEmptyArray_ForEmptyStringElement Empty-string JSON element produces []
ValueKeys_ReturnsSingleElementArray_ForNonArrayValue Non-array scalar produces a one-element array
ValueKeys_ReturnsMultipleElements_ForJsonArray JSON array produces one entry per element
ReadOptions_OptionWithoutValueUsesLabelAsKey An option object with no "value" property falls back to the label as key/value

Test Status

SetupEngine tests: 256 passed, 1 failed (pre-existing: SetupContextTests.Constructor_SetsLocalDataDirFromLocalAppDataRootEnvironment fails on Linux due to Windows path separator — unrelated to this change; baseline is also 1 failure).

Shared tests: 2214 passed, 8 failed (all pre-existing infrastructure failures — unchanged vs baseline).

Generated by 🌈 Repo Assist, see workflow run. Learn more.

Add this agentic workflows to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@97143ac59cb3a13ef2a77581f929f06719c7402a

Add 10 tests covering previously untested paths in WizardAnswerBuilder:

- BuildWireValue(select): falls back to string when option not found
- BuildWireValue(multiselect): splits comma string when options list is empty
- BuildWireValue(multiselect): splits comma string when answer not in options
- ReadOptions: returns empty for non-object input
- ReadOptions: returns empty when 'options' property is missing
- ReadOptions: returns empty when 'options' is not an array
- ValueKeys: returns [] for empty-string JSON element
- ValueKeys: returns single-element array for non-array scalar
- ValueKeys: returns multiple elements for JSON array
- ReadOptions: option without 'value' property uses label as key

These paths were introduced in b90ded9 (Preserve wizard option wire values)
and are exercised at runtime but had no regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@clawsweeper

clawsweeper Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed June 12, 2026, 6:17 PM ET / 22:17 UTC.

Summary
Review failed before ClawSweeper could summarize the requested change.

Reproducibility: unclear. The review failed before ClawSweeper could establish a reproduction path.

Review metrics: none identified.

Merge readiness
Overall: 🌊 off-meta tidepool
Proof: 🌊 off-meta tidepool
Patch quality: 🌊 off-meta tidepool
Result: rating does not apply to this item.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Risk before merge

  • [P1] No close action taken because the review did not complete.

Maintainer options:

  1. Decide the mitigation before merge
    Retry the Codex review after fixing the execution failure.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • Review did not complete, so no work-lane recommendation was made.
Review details

Best possible solution:

Retry the Codex review after fixing the execution failure.

Do we have a high-confidence way to reproduce the issue?

Unclear. The review failed before ClawSweeper could establish a reproduction path.

Is this the best way to solve the issue?

Unclear. Retry the review first so ClawSweeper can evaluate the actual issue and fix direction.

AGENTS.md: unclear because the file could not be read completely.

Codex review notes: model internal, reasoning high; reviewed against ebacf0c825f9.

Label changes

Label changes:

  • add rating: 🌊 off-meta tidepool: Overall readiness is 🌊 off-meta tidepool; proof is 🌊 off-meta tidepool and patch quality is 🌊 off-meta tidepool.
  • remove P3: Current review triage priority is none.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🌊 off-meta tidepool, so this older rating label is no longer current.
  • remove status: 👀 ready for maintainer look: Current PR status no longer selects a status label.

Label justifications:

  • rating: 🌊 off-meta tidepool: Overall readiness is 🌊 off-meta tidepool; proof is 🌊 off-meta tidepool and patch quality is 🌊 off-meta tidepool.
Evidence reviewed

What I checked:

  • failure reason: codex execution failed.
  • codex failure detail: Codex review failed for this PR with exit 1.
  • codex stderr: es/gateway-protocol/src/schema/wizard.ts\nWizardStepOptionSchema = { value: Type.Unknown(), label, hint? }\nWizardAnswerSchema = { stepId, value: Type.Optional(Type.Unknown()) }\n// initialValue is Type.Unknown() too\n\n\nCrucially, **the gateway does no normalization on the way back in**. `wizard.next` hands the raw client value straight to the onboard runner, cast to the expected type — there is no server-side option-matching or coercion for `select`/`multiselect`:\n\nts\n// src/wizard/session.ts\nasync answer(stepId, value) { ...; deferred.resolve(value); } // raw value, untouched\nasync select(...) { return res as T; } // no matching, no coercion\nasync multiselect(...) { return (Array.isArray(res) ? res : []) as T[]; }\n\n\nSo whatever JSON type the client sends is fed directly into the runner's `===` comparisons and config writes. The macOS reference client honors this and sends the **raw typed value**:\n\nswift\n// apps/macos/.../WizardCommand.swift\nreturn option.value?.value ?? option.label // raw decoded JSON value\nanswerPayload["value"] = ProtoAnyCodable(answer) // type preserved on the wire\n\n\nThe Windows client was the **outlier**. It stringified everything when reading options and when building the answer:\n\ncsharp\n// before\nvar value = option.TryGetProperty("value", out var v) ? v.ToString() : option.ToString();\n// ...\nTag = option.Value,.
  • codex stdout: No stdout captured.

Likely related people:

  • unknown: Codex failed before it could trace repository history. (role: review did not complete; confidence: low)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. labels Jun 12, 2026
@kmahone kmahone marked this pull request as ready for review June 12, 2026 22:14
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. repo-assist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants