Skip to content

Add cf analyze for failed remote design runs - #30

Open
marwaneltoukhy wants to merge 1 commit into
mainfrom
feature/run-assistant
Open

Add cf analyze for failed remote design runs#30
marwaneltoukhy wants to merge 1 commit into
mainfrom
feature/run-assistant

Conversation

@marwaneltoukhy

@marwaneltoukhy marwaneltoukhy commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds cf analyze so a logged-in, linked project can ask the platform AI assistant about a failed remote precheck, PnR, simulation, or tapeout/DRC run. After remote --poll failures, the CLI also prints a one-line hint to run cf analyze.

Depends on backend https://github.com/chipfoundry/chipignite-backend-services/pull/176 (public API mounts the same /projects/{id}/assistant/... routes). Companion PRs:

Command

cf login
cf analyze
cf analyze --job-type precheck --job-id <uuid>
cf analyze --question "What should I try next?"
  • Resolves platform_project_id from the linked repo (cf link).
  • Default: latest failed remote precheck / PnR / sim / tapeout DRC on that project.
  • Prints the first analysis, remaining quota ($xx.xx), then an interactive follow-up loop (empty / q / quit / exit to stop). --question sends one follow-up and exits.
  • 180s HTTP timeout for the LLM turn.
  • Uses the existing Bearer API-key pattern (cf login).

Hints after failure (and after completed-with-failed-checks when results are present):

  • cf precheck --remote --poll
  • cf harden --remote --poll (PnR)
  • cf verify --remote --poll (simulation)

Test plan

Needs a published CLI pointing at an environment with backend PR 176 migrated, cf login, and a reserved+linked project with a failed remote run.

  • cf analyze --help lists --job-type, --job-id, --question
  • cf --help includes analyze (tests/test_all_commands.py updated)
  • Not logged in / not linked: clear error (cf login / cf link)
  • Default pick analyzes the latest failed remote job and prints remaining quota
  • --job-type / --job-id override works
  • --question sends one follow-up; interactive loop accepts a second question then empty exit
  • Failed cf precheck --remote --poll (and harden/verify) prints cf analyze
  • Completed remote job with failed checks also prints the hint
  • Ineligible / quota exhausted surfaces the API error via _format_api_error

Version bump is not included here; bump __version__ when this is ready to publish.

Uses the login token to analyze the latest failed precheck, PnR, simulation, or tapeout run and prints a hint after remote poll failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant