Skip to content

feat(studio): L09a portability check pass and adapt export - #1081

Merged
LinuxDevil merged 2 commits into
mainfrom
fb-l09a-portability
Nov 12, 2026
Merged

LinuxDevil merged 2 commits into
mainfrom
fb-l09a-portability

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

Summary

  • server/passes/portability.ts: the portability_check pass - PORTABILITY_SYSTEM_PROMPT, truncate-don't-reject portabilityOutputSchema (500/200/300/300 clips, 20-finding cap, other enum fallback), bounded buildPortabilityInput (24k instructions cap, 8k masked-JSON sections, { file } instructions noted, secret/env refs rendered as placeholders - never values), and checkPortability caching agent analyses by specHash in the suggestion store / import text in a 20-entry LRU.
  • server/passes/portabilityRoutes.ts: POST /agents/:id/portability and POST /agents/import/portability (registered before /agents/:id routes), mapping pass outcomes to 503/409/422/502.
  • GET /agents/:id/export?adapt=1 serves the cached adapted instructions; 409 LOUSHO_PORTABILITY_MISSING until a check for the current hash exists.
  • runtimeClient: checkPortability, checkImportPortability, downloadExport({ adapt }).
  • Shared clip helper extracted to server/passes/clip.ts (was duplicated in draftReview).

Test plan

  • portability.test.ts (17): input building, secret-ref masking, caps, file instructions, schema transforms/fallback, adapted-instructions normalization, cache hit/miss + LRU, error mapping, prompt snapshot
  • portabilityRoutes.test.ts (7): agent + import routes, caching, error statuses, adapt export success/409 for yaml and bundle
  • Server typecheck + full server suite (1578) + touched suites green; eslint clean; fallow dead-code/dupes clean for touched files

Generated with Devin

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@LinuxDevil
LinuxDevil merged commit ba6c032 into main Nov 12, 2026
6 checks passed
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