Skip to content

Add isolated app testing workflow - #4121

Merged
juliusmarminge merged 5 commits into
mainfrom
codex/test-t3-app-skill
Jul 19, 2026
Merged

juliusmarminge merged 5 commits into
mainfrom
codex/test-t3-app-skill

Require browser flag for dev auto-open

c2735c0
Select commit
Loading
Failed to load commit list.
MacroscopeApp / Macroscope - Effect Service Conventions succeeded Jul 18, 2026 in 1m 21s

Effect Service Conventions: No issues found

All clear

Details

Note

Your check run agent prompt is: .macroscope/check-run-agents/effect-service-conventions.md
More information about how Check Run Agents work can be found in our Help Center.

Reviewed the changed TypeScript in scope, focusing on the new apps/server/scripts/t3-sqlite-state.ts and its test, plus the touched apps/server/src/config.ts, apps/server/src/cli/config.ts, apps/desktop/src/app/DesktopEnvironment.ts, and scripts/dev-runner.ts.

The prior run's finding — that SqliteStateInputError used a reason discriminator with a switch in the message getter to select user-facing messages — has been resolved. It is now split into dedicated tagged error classes (SqliteStateMultipleSqlSourcesError, SqliteStateMissingSqlSourceError, SqliteStateEmptySqlError), each with a constant validation message and no redundant discriminator.

Other conventions verified as satisfied:

  • Namespace imports from effect/* subpaths; named imports only for whole packages/pure helpers (effect/unstable/cli, @t3tools/shared/schemaJson).
  • All service failures use Schema.TaggedErrorClass with structured attributes; message derived from those attributes.
  • SqliteStateDatabaseError uses a single tag with a multi-value operation discriminator (query|exec) and a generic message — the allowed shared-semantics model, not a redundant single-value discriminator.
  • Schema.Defect() causes in SqliteStateSqlFileError/SqliteStateDatabaseError preserve the real underlying failure as cause alongside structural fields; messages do not stringify the cause.
  • No fake dependency injection, module-global runtimes, or runPromise/ManagedRuntime in service/domain code; runtime boundaries confined to the CLI import.meta.main block.
  • ServerConfig service definition and deriveServerPaths options change follow canonical structure.

No concrete convention violations remain in the changed scope.


🔍 Agent activity — reasoning, no tool calls

💭 Looking at the PR changes, the author addressed the prior feedback by splitting the discriminated SqliteStateInputError into separate error classes for different failure modes. Now I'm reviewing the new t3-sqlite-state.ts file to check for any convention violations in the error classes and other code patterns. The error classes follow the proper structure using Schema.TaggedErrorClass with well-defined attributes. SqliteStateSqlFileError includes the file path and a defect cause, while SqliteStateDatabaseError captures the operation, database path, and cause. The imports look correct—namespace imports from effect subpaths and named imports for pure helpers like the JSON schema utility. The operation discriminator is properly defined as a multi-value literal and used in the database error, which matches the allowed pattern for service-level errors. Let me verify the rest of the error handling patterns. I need to adjust the repo parameter. The SqliteStateDatabaseError wraps both query and exec operations under one generic error, but it does capture structured context like operation and databasePath while preserving the underlying cause, which aligns with the conventions since the operation discriminator provides meaningful context. Let me continue checking the other error patterns. The input validation errors with empty fields are actually fine since they're pure domain errors with static messages, which the convention allows. I'm checking whether mapError on line 238-245 causes double-wrapping of domain errors, but resolveSqlSource runs first so those errors bypass the wrapper—no issue there. Now I'm verifying the SqliteStateDatabaseError doesn't violate the convention about encoding distinctions twice. The operation discriminator is multi-valued (query|exec) while the tag is specific, so there's no redundant encoding. The config.ts and DesktopEnvironment.ts changes are straightforward and don't introduce convention violations. For the CLI imports from effect/unstable/cli, I need to determine whether this is a subpath package or module to verify if the named imports follow the convention correctly. Now I'm checking whether the error definitions properly use Schema.Defect() — the convention requires that the tag, fields, or both must structurally identify the failure, not just serve as a generic error container. Looking at SqliteStateSqlFileError and SqliteStateDatabaseError, they both have distinct tags, include relevant fields like filePath and operation, and preserve the cause without stringifying it into the message. That's the correct pattern, so this is solid. Let me do a final sweep of the other touched files like config.ts and DesktopEnvironment.ts to make sure nothing else violates the conventions — though those changes are just small path-derivation logic, not service-level concerns. Since the prior issue is now fixed, I don't need to add another comment. There's a tension between the system requirement to output valid JSON and the customer's instruction to respond with "All clear" when there are no findings, but the JSON schema is authoritative for output format, so I'll set the check state to success with no findings. The config file looks good and follows the right patterns. The earlier error handling issue got resolved by breaking it into separate exception classes, and there are no new problems to flag. I'll format the response as JSON with a success status and an "All clear" message like the customer requested.


Agent Credits: 49 credits