Skip to content

Migrate more StrataMain commands to SimpleAPI#733

Merged
shigoel merged 6 commits intomainfrom
shilpi/more-main-api
Apr 3, 2026
Merged

Migrate more StrataMain commands to SimpleAPI#733
shigoel merged 6 commits intomainfrom
shilpi/more-main-api

Conversation

@shigoel
Copy link
Copy Markdown
Contributor

@shigoel shigoel commented Apr 1, 2026

Summary

  • Add readLaurelTextFile to SimpleAPI, replacing duplicated 8-line
    Laurel parsing boilerplate in 4 commands (laurelParse, laurelAnalyze,
    laurelAnalyzeToGoto, laurelToCore)
  • Add readLaurelIonFiles / readLaurelIonProgram to SimpleAPI,
    replacing the local deserializeIonToLaurelFiles helper
  • Add readPythonIon / pythonDirectToCore to SimpleAPI, replacing
    the local readPythonStrata helper used by 3 commands
  • Add Laurel.verifyProgram / Laurel.analyzeToDiagnosticModels to
    SimpleAPI for Laurel analysis
  • Route pyAnalyzeCommand through Core.verifyProgram instead of
    manually managing temp directories
  • Remove 7 imports from StrataMain now provided via SimpleAPI

🤖 Generated with Claude Code

shigoel and others added 2 commits April 1, 2026 13:47
Add to SimpleAPI:
- readLaurelTextFile: parse Laurel source files (replaces 4x
  duplicated boilerplate in laurelParse, laurelAnalyze,
  laurelAnalyzeToGoto, laurelToCore commands)
- readLaurelIonFiles / readLaurelIonProgram: deserialize Laurel
  Ion bytes (replaces local deserializeIonToLaurelFiles helper)
- readPythonIon / pythonDirectToCore: Python direct-to-Core
  pipeline (replaces local readPythonStrata helper)
- Laurel.verifyProgram / Laurel.analyzeToDiagnosticModels:
  Laurel analysis wrappers
- Use Core.verifyProgram in pyAnalyzeCommand instead of manually
  managing temp directories

Clean up 7 imports from StrataMain that are now provided via
SimpleAPI.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shigoel shigoel requested a review from a team April 1, 2026 19:02
@shigoel shigoel enabled auto-merge April 1, 2026 19:07
@shigoel shigoel marked this pull request as draft April 1, 2026 19:24
auto-merge was automatically disabled April 1, 2026 19:24

Pull request was converted to draft

shigoel and others added 3 commits April 1, 2026 15:38
Replace hardcoded exit code 1 with appropriate ExitCode constants
in verifyCommand: userError for parse/type-check errors,
failuresFound for verification failures, internalError for
unexpected exceptions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The verifyCommand now exits with ExitCode.failuresFound (2) for
verification failures instead of 1.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shigoel shigoel marked this pull request as ready for review April 1, 2026 20:45
@shigoel shigoel enabled auto-merge April 1, 2026 20:45
atomb
atomb previously approved these changes Apr 1, 2026
Copy link
Copy Markdown
Contributor

@MikaelMayer MikaelMayer left a comment

Choose a reason for hiding this comment

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

A few comments below

- Fix docstring for Core.verifyProgram: "Analyze" → "Verify"
- Extract parseLaurelText helper from readLaurelTextFile so callers
  with already-read content avoid a redundant file read
- Use parseLaurelText in laurelAnalyzeToGotoCommand to eliminate
  the double read of the input file
- Fix indentation of if/for/match block in laurelAnalyzeCommand
  (was 6-space as if inside a match arm, should be 4-space)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@shigoel shigoel added this pull request to the merge queue Apr 3, 2026
Merged via the queue into main with commit 228c558 Apr 3, 2026
15 checks passed
@shigoel shigoel deleted the shilpi/more-main-api branch April 3, 2026 02:41
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.

3 participants