feat(aircoding): AirCoding V2 baseline — deterministic multi-agent architecture
Forked from OpenCode v1.17.4 with multi-agent system: - 5 agents: aircoding, scheduler, worker, architect, reviewer - Deterministic DAG scheduling engine (coordinator_tick) - Tool whitelists as hard enforcement - AirCoding validation plugin - V1 requirements: C4 docs, ADR, AGENTS.md, debug-log.md - Design documents in docs/
This commit is contained in:
27
packages/core/test/pty/info-schema.test.ts
Normal file
27
packages/core/test/pty/info-schema.test.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { describe, expect, test } from "bun:test"
|
||||
import { Schema } from "effect"
|
||||
import { Pty } from "@opencode-ai/core/pty"
|
||||
|
||||
const sample = (pid: number) => ({
|
||||
id: "pty_01J5Y5H0AH4Q4NXJ6P4C3P5V2K",
|
||||
title: "demo",
|
||||
command: "cmd.exe",
|
||||
args: [],
|
||||
cwd: "C:\\",
|
||||
status: "running",
|
||||
pid,
|
||||
})
|
||||
|
||||
describe("Pty.Info", () => {
|
||||
test("accepts pid 0 (Windows ConPTY assigns the pid asynchronously)", () => {
|
||||
expect(Schema.decodeUnknownSync(Pty.Info)(sample(0)).pid).toBe(0)
|
||||
})
|
||||
|
||||
test("accepts a positive pid", () => {
|
||||
expect(Schema.decodeUnknownSync(Pty.Info)(sample(48012)).pid).toBe(48012)
|
||||
})
|
||||
|
||||
test("rejects a negative pid", () => {
|
||||
expect(() => Schema.decodeUnknownSync(Pty.Info)(sample(-1))).toThrow()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user