Skip to content

Classify non-Node app types (python/go/docker/static) in streamingDetect #4137

Description

@atomantic

`streamingDetect.js` emits `vite+express` / `vite` / `single-node-server` / `nextjs`, the four Apple types, or `unknown` (the initialized default) — there is no `python`, `go`, `docker`, or `static`. `usesPm2()` is the negation of `NON_PM2_TYPES` (the four Apple types), so everything unrecognized is treated as a PM2 app: a Python service, Docker stack, Go binary, or static site all come back `unknown` and are still offered PM2 standardization in the Add App wizard. That matters because the standardizer's prompt opens with "You are analyzing a Node.js application" (`server/services/pm2Standardizer.js`) — on a Python repo it doesn't fail, it confidently writes a Node ecosystem config. The auto-fire is gone (standardizing is now an explicit button whose copy says "skip it for Docker stacks, static sites, or anything you start another way"), so this is no longer a data-loss path, but the prose is doing a type check's job.

Fix shape: don't widen `NON_PM2_TYPES` — its three other consumers mean "Apple", not "not PM2". Teach `streamingDetect` to classify `python` / `go` / `docker` / `static` from marker files (`pyproject.toml`/`requirements.txt`, `go.mod`, `docker-compose.yml` with no package.json, `index.html` with no server) so `unknown` stops being the catch-all, then add a positive `isStandardizable(type)` predicate over the Node types and gate both the wizard card and `standardizeRefusalFor()` on it. Note `type` is persisted on the app record, so an existing `unknown` app keeps that type until re-detected — the predicate must stay permissive for `unknown` or offer a re-detect.

Surfaced by the /simplify altitude review on the opt-in-standardization change.

Migrated from PLAN.md by /do:replan --issues.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

planTracked by /do:replan

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions