Skip to content

๐ŸŽจ Palette: CLI ์‹œ๋ฎฌ๋ ˆ์ด์…˜ ๋ช…๋ น์˜ ์—๋Ÿฌ ์ฒ˜๋ฆฌ ๊ฐœ์„  (DX ํ–ฅ์ƒ)#60

Open
seonghobae wants to merge 1 commit into
mainfrom
feat/cli-dx-improvement-11773325611873390064
Open

๐ŸŽจ Palette: CLI ์‹œ๋ฎฌ๋ ˆ์ด์…˜ ๋ช…๋ น์˜ ์—๋Ÿฌ ์ฒ˜๋ฆฌ ๊ฐœ์„  (DX ํ–ฅ์ƒ)#60
seonghobae wants to merge 1 commit into
mainfrom
feat/cli-dx-improvement-11773325611873390064

Conversation

@seonghobae

Copy link
Copy Markdown
Contributor

๐Ÿ’ก What: fast-mlsirm simulate CLI ๋ช…๋ น ์ˆ˜ํ–‰ ์ค‘ ๋ฐœ์ƒํ•˜๋Š” ์„ค์ • ๊ด€๋ จ ValueError๋ฅผ ์บ์น˜ํ•˜์—ฌ ๊น”๋”ํ•œ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€๋กœ ๋ฐ˜ํ™˜ํ•˜๋„๋ก ๊ฐœ์„ ํ–ˆ์Šต๋‹ˆ๋‹ค.
๐ŸŽฏ Why: ๊ธฐ์กด์—๋Š” ์œ ํšจํ•˜์ง€ ์•Š์€ ์ธ์ž(์˜ˆ: --persons -5)๋ฅผ ๋„ฃ์—ˆ์„ ๋•Œ ์›์‹œ์ ์ธ Python Stack Trace๊ฐ€ ๋…ธ์ถœ๋˜์–ด ์‚ฌ์šฉ์ž(๊ฐœ๋ฐœ์ž) ๊ฒฝํ—˜์ด ๋–จ์–ด์กŒ์Šต๋‹ˆ๋‹ค. try-except ์ฒ˜๋ฆฌ๋ฅผ ํ†ตํ•ด ๋‹ค๋ฅธ ๋ช…๋ น์–ด๋“ค(fit, diagnose-fit ๋“ฑ)๊ณผ ๋™์ผํ•˜๊ฒŒ ์ผ๊ด€๋œ ์—๋Ÿฌ ์ฒ˜๋ฆฌ ๋ฐ ์ƒํƒœ ์ฝ”๋“œ๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋„๋ก ๊ฐœ์„ ํ–ˆ์Šต๋‹ˆ๋‹ค.
๐Ÿ“ธ Before/After:
Before:

โณ Simulating -5 persons and 2 dimensions...
Traceback (most recent call last):
  ...
ValueError: n_persons must be >= 1

After:

โณ Simulating -5 persons and 2 dimensions...
โŒ Error: Invalid configuration - n_persons must be >= 1

PR created automatically by Jules for task 11773325611873390064 started by @seonghobae

`fast-mlsirm simulate` ๋ช…๋ น ์‹คํ–‰ ์‹œ ์ž˜๋ชป๋œ ์„ค์ •(์˜ˆ: ์Œ์ˆ˜ ์ธ์›์ˆ˜ ๋“ฑ)์œผ๋กœ ์ธํ•œ `ValueError`๊ฐ€ ๋ฐœ์ƒํ•  ๋•Œ, Python์˜ ๋‚  ๊ฒƒ ๊ทธ๋Œ€๋กœ์˜ ์Šคํƒ ํŠธ๋ ˆ์ด์Šค(stack trace)๊ฐ€ ์ถœ๋ ฅ๋˜์–ด ๊ฐœ๋ฐœ์ž ๊ฒฝํ—˜(Developer Experience, DX)์ด ์ €ํ•˜๋˜๋Š” ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

์ด๋ฅผ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด `python/fast_mlsirm/cli.py`์˜ `simulate` ํ˜ธ์ถœ๋ถ€๋ฅผ `try-except` ๋ธ”๋ก์œผ๋กœ ๊ฐ์‹ธ `ValueError`๋ฅผ ์ ์ ˆํžˆ ์ฒ˜๋ฆฌํ•˜๋„๋ก ๊ฐœ์„ ํ–ˆ์Šต๋‹ˆ๋‹ค.
์‚ฌ์šฉ์ž์—๊ฒŒ ์ง๊ด€์ ์ด๊ณ  ์นœ์ ˆํ•œ ์—๋Ÿฌ ๋ฉ”์‹œ์ง€(์˜ˆ: `โŒ Error: Invalid configuration - ...`)๋ฅผ `sys.stderr`๋กœ ์ถœ๋ ฅํ•˜๊ณ  ์ข…๋ฃŒ ์ฝ”๋“œ `1`์„ ๋ฐ˜ํ™˜ํ•˜๊ฒŒ ํ•˜์—ฌ CLI ๋„๊ตฌ์˜ ํŽธ์˜์„ฑ๊ณผ ์‚ฌ์šฉ์„ฑ์„ ํ–ฅ์ƒ์‹œ์ผฐ์Šต๋‹ˆ๋‹ค.
Copilot AI review requested due to automatic review settings July 2, 2026 02:53
@google-labs-jules

Copy link
Copy Markdown

๐Ÿ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a ๐Ÿ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

fast-mlsirm simulate ์‹คํ–‰ ์ค‘ ์ž˜๋ชป๋œ ์„ค์ •๊ฐ’์œผ๋กœ ์ธํ•ด ๋ฐœ์ƒํ•˜๋Š” ValueError๋ฅผ CLI ๋ ˆ๋ฒจ์—์„œ ์บ์น˜ํ•ด, Python ์ŠคํƒํŠธ๋ ˆ์ด์Šค ๋Œ€์‹  ์ผ๊ด€๋œ ์‚ฌ์šฉ์ž ์นœํ™”์  ์—๋Ÿฌ ๋ฉ”์‹œ์ง€์™€ ์ข…๋ฃŒ ์ฝ”๋“œ(1)๋ฅผ ๋ฐ˜ํ™˜ํ•˜๋„๋ก ๊ฐœ์„ ํ•ฉ๋‹ˆ๋‹ค.

Changes:

  • simulate ์„œ๋ธŒ์ปค๋งจ๋“œ์—์„œ simulate(MLS2PLMConfig(...)) ํ˜ธ์ถœ์„ try/except ValueError๋กœ ๊ฐ์Œˆ
  • ์„ค์ • ์˜ค๋ฅ˜ ์‹œ stderr๋กœ โŒ Error: Invalid configuration - ... ์ถœ๋ ฅ ํ›„ return 1 ์ฒ˜๋ฆฌ

๐Ÿ’ก Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread python/fast_mlsirm/cli.py
Comment on lines +187 to +201
try:
data = simulate(
MLS2PLMConfig(
n_persons=args.persons,
n_dims=args.dims,
items_per_dim=args.items_per_dim,
latent_dim=args.latent_dim,
phi=args.phi,
gamma=args.gamma,
seed=args.seed,
)
)
)
except ValueError as e:
print(f"โŒ Error: Invalid configuration - {str(e)}", file=sys.stderr)
return 1

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

OpenCode reviewed the current-head evidence but found unresolved reviewer or review-agent threads before approval.

Findings

1. HIGH .github/workflows/opencode-review.yml:1 - Unresolved reviewer thread blocks automated approval

  • Problem: OpenCode reached an APPROVE control result, but the approval step found unresolved, non-outdated human or review-agent thread evidence on the current pull request.
  • Root cause: Reviewer and review-agent feedback can arrive after bounded model evidence is prepared, so the approval step must re-query GitHub immediately before publishing an approval.
  • Fix: Address or resolve the listed reviewer thread(s), then re-run OpenCode on the current head.
  • Regression test: Keep the approval gate querying reviewThreads(first: 100) after model output and before create_pull_review APPROVE, including bot review agents other than OpenCode itself.

Review thread evidence

Latest unresolved reviewer thread evidence

python/fast_mlsirm/cli.py line 201

  • Latest reviewer comment: @copilot-pull-request-reviewer at 2026-07-02T02:55:09Z

  • Comment URL: #60 (comment)

  • Comment excerpt: The new 'simulate' ValueError handling path isnโ€™t covered by tests, so regressions (e.g., returning a traceback again or changing the exit code/message) would go unnoticed. Add a CLI test that runs 'main()' with an invalid '--persons' (or other invalid config) and asserts exit code 1 and that stderr contains the expected "Invalid configuration" message.

  • Result: REQUEST_CHANGES

  • Reason: unresolved reviewer or review-agent thread(s) were present before approval.

  • Head SHA: 20413b1e44823587057a22ed3ff2684078cb23f7

  • Workflow run: 28562002543

  • Workflow attempt: 1

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: cli.py"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: cli.py"]
  R1 --> V1["required checks"]
Loading

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

OpenCode Review Overview

  • Head SHA: 20413b1e44823587057a22ed3ff2684078cb23f7
  • Workflow run: 28562002543
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode reviewed the current-head evidence but found unresolved reviewer or review-agent threads before approval.

Findings

1. HIGH .github/workflows/opencode-review.yml:1 - Unresolved reviewer thread blocks automated approval

  • Problem: OpenCode reached an APPROVE control result, but the approval step found unresolved, non-outdated human or review-agent thread evidence on the current pull request.
  • Root cause: Reviewer and review-agent feedback can arrive after bounded model evidence is prepared, so the approval step must re-query GitHub immediately before publishing an approval.
  • Fix: Address or resolve the listed reviewer thread(s), then re-run OpenCode on the current head.
  • Regression test: Keep the approval gate querying reviewThreads(first: 100) after model output and before create_pull_review APPROVE, including bot review agents other than OpenCode itself.

Review thread evidence

Latest unresolved reviewer thread evidence

python/fast_mlsirm/cli.py line 201

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file: cli.py"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file: cli.py"]
  R1 --> V1["required checks"]
Loading

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.

2 participants