Skip to content

feat(dev): add credential-free local AI development - #152

Merged
cheetahbyte merged 3 commits into
mainfrom
feat/emulate-local-dev
Nov 22, 2026
Merged

cheetahbyte merged 3 commits into
mainfrom
feat/emulate-local-dev

Conversation

@cheetahbyte

@cheetahbyte cheetahbyte commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add an opt-in Emulate-backed local development profile so bot chat and local tools can be exercised without live provider credentials.

  • bun run dev:emulate starts Crumble and Emulate on loopback with isolated, persistent development data and a preconfigured local provider.
  • Five scripted models cover replies, streaming, history_search, provider errors, and stoppable stalled streams through Pi's real HTTP transport.
  • Keep existing faux-provider tests and production startup unchanged. Emulator-backed verification runs separately with bun run check:emulate, never in CI.
  • Document setup and remove Fallow from development dependencies, configuration, hooks, and CI. Other quality checks remain enabled.

This provides scripted behavior, not real inference or emulation of workspaces and external integrations.

Evidence

  • bun run check: 1,332 passed, 118 skipped after integrating current main and removing Fallow.
  • bun run check:emulate: passed, including streaming, actual tool execution, abort delivery, strict rejection, no fallback, restart persistence on a new endpoint, and occupied-listener preservation.
  • Docs checks/build and site build/typecheck passed in the push hook.
  • Isolated browser walkthrough covered signup, provider selection, all five scenarios, and persistence across reload. Interrupt closed both listeners.
  • Fresh-context review completed; its data-directory containment finding was fixed with a regression test.
  • Commit and push hooks passed without bypasses. The canceled metric-only refactors were not retained.

Risk & Rollback

Reversibility: Reversible; no schema migration or public API contract change.

Blast Radius: The opt-in local development profile, account model-catalog construction, and repository analysis tooling.

Normal application startup retains its existing behavior. Local process startup/cleanup and scenario-provider compatibility are the main runtime risks. Reverting the change restores prior behavior; ignored local profile data can remain. Removing Fallow also removes its analysis and boundary checks; lint, formatting, type checks, tests, and documentation checks remain enabled.

@github-actions

Copy link
Copy Markdown

Fallow audit report

Review needed

Found 5 findings: Dependencies 2, Health 3.

Dependencies (2)
Severity Rule Location Description
minor fallow/dev-dependency-in-production package.json:15 devDependency 'emulate' is imported by production code at runtime (consider moving to dependencies)
minor fallow/dev-dependency-in-production package.json:21 devDependency 'zod' is imported by production code at runtime (consider moving to dependencies)
Health (3)
Severity Rule Location Description
minor fallow/high-crap-score tools/check-emulate.ts:38 'transportSmoke' has CRAP score 56.0 (threshold: 30.0, cyclomatic 7)
minor fallow/high-crap-score tools/check-emulate.ts:192 'applicationSmoke' has CRAP score 72.0 (threshold: 30.0, cyclomatic 8)
minor fallow/high-crap-score tools/check-emulate.ts:296 'observe' has CRAP score 42.0 (threshold: 30.0, cyclomatic 6)

Generated by fallow.

Gate outcomes: warned audit-verdict.

Comment thread package.json
"@oxlint/plugins": "1.88.0",
"@types/bun": "latest",
"@types/node": "^26.6.6",
"emulate": "0.14.0",
Comment thread package.json
"oxlint-tsgolint": "7.0.2005",
"typescript": "7.0.2"
"typescript": "7.0.2",
"zod": "4.6.7"
Comment thread tools/check-emulate.ts
.flatMap((block) => (block.type === "text" ? [block.text] : []))
.join("");

async function transportSmoke() {
Comment thread tools/check-emulate.ts
);
}

async function applicationSmoke() {
Comment thread tools/check-emulate.ts
);
};

const observe = async (id: string, accept: (chat: Snapshot) => boolean) => {
@cheetahbyte
cheetahbyte merged commit 0d12da5 into main Nov 22, 2026
8 checks passed
@cheetahbyte
cheetahbyte deleted the feat/emulate-local-dev branch November 22, 2026 19:17
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