Skip to content

Flatten example as a linear tutorial; run and stream logs#1

Merged
socksy merged 1 commit into
mainfrom
simplify-as-tutorial
Apr 23, 2026
Merged

Flatten example as a linear tutorial; run and stream logs#1
socksy merged 1 commit into
mainfrom
simplify-as-tutorial

Conversation

@socksy
Copy link
Copy Markdown
Contributor

@socksy socksy commented Apr 23, 2026

Rewrites src/index.ts to read top-to-bottom as six numbered steps: config, read files, build package, ensure app, upload, run and stream output.

The example now also runs the deployed app and streams its program output via /logs/stream, so the script demonstrates a full deploy-and-execute round trip.

Summary by CodeRabbit

  • Improvements

    • Refined log output during deployment to display only program-relevant messages for improved clarity.
    • Enhanced error handling for the app deployment workflow with explicit status messaging.
  • Chores

    • Refactored deployment process workflow for better maintainability.

@socksy socksy merged commit 1d1d82c into main Apr 23, 2026
1 check was pending
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 295c9422-dfff-4455-a408-608acb6f6edc

📥 Commits

Reviewing files that changed from the base of the PR and between 6ac2d0a and 0a05e23.

📒 Files selected for processing (1)
  • src/index.ts

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Walkthrough

The main entry point script has been refactored from a modular function-based architecture into a single linear async workflow. The deployment process now performs file collection, app existence checks, deployment bundle building, and log streaming inline using HTTP branching and Server-Sent Events (SSE) parsing.

Changes

Cohort / File(s) Summary
Main script refactor
src/index.ts
Restructured from separate functions (walk, collectAppFiles, ensureApp, deploy, main) into single linear async flow. File collection now uses readdir with recursive: true. App existence checks use inline HTTP status branching (200/404/error). Deployment adds SHA-256 checksums and content-length headers. Log streaming added via /runs/{seq}/logs/stream with SSE parsing for event: log frames. API base URL hardcoded inline. Removed stat usage. Net +84/-104 lines.

Poem

🐰 Workflows now flow like a burrow so deep,
Linear and swift, no functions to keep,
Files gathered quick, apps checked with care,
Logs streamed like carrots through SSE air,
One path to deploy, so clean and so fair!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch simplify-as-tutorial

Comment @coderabbitai help to get the list of available commands and usage tips.

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