fix: stabilize CI runner compatibility and governance docs#4
Conversation
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
There was a problem hiding this comment.
Pull request overview
This PR stabilizes CI behavior and documentation by fixing pipeline orchestration to reuse the persisted pipeline ID, removing machine-specific filesystem assumptions in tests, and aligning PR governance docs with current branch protection expectations.
Changes:
- Ensure chat pipeline stages reuse the persisted
pipeline_runs.idfor a session (instead of a transient UUID). - Replace hardcoded local paths in tests with repo-relative or temp-directory paths for runner compatibility.
- Update EN/TR PR guide docs to reflect protected-branch policies on
main.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/github/git-utils.test.ts | Makes the “current project” path repo-relative to work on CI runners. |
| tests/helpers/test-utils.ts | Uses real temporary directories instead of hardcoded /tmp/test-project. |
| src/index.ts | Synchronizes ctx.pipelineId from the persisted session pipeline each loop iteration. |
| docs/tr/pr-kilavuzu.md | Updates TR governance bullets to match current main protections. |
| docs/en/pull-request-guide.md | Updates EN governance bullets to match current main protections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| import { mkdtempSync } from "node:fs" | ||
| import { tmpdir } from "node:os" | ||
| import { join } from "node:path" | ||
|
|
||
| import { initializeDatabase } from "../../src/state/database.js" | ||
|
|
||
| function createTempProjectDirectory(): string { | ||
| return mkdtempSync(join(tmpdir(), "opencode-ceo-test-")) | ||
| } | ||
|
|
There was a problem hiding this comment.
createTempProjectDirectory() creates real temp directories but nothing in this helper or the call sites cleans them up, so repeated unit test runs will leak /tmp/opencode-ceo-test-* directories (and possibly .ceo/state.db files) on developer machines/CI runners. Consider tracking created directories and exposing a cleanup helper (to be called from test afterEach/afterAll), or allow callers to pass in a directory so tests that only need client don’t create filesystem state unnecessarily.
| import { mkdtempSync } from "node:fs" | |
| import { tmpdir } from "node:os" | |
| import { join } from "node:path" | |
| import { initializeDatabase } from "../../src/state/database.js" | |
| function createTempProjectDirectory(): string { | |
| return mkdtempSync(join(tmpdir(), "opencode-ceo-test-")) | |
| } | |
| import { mkdtempSync, rmSync } from "node:fs" | |
| import { tmpdir } from "node:os" | |
| import { join } from "node:path" | |
| import { initializeDatabase } from "../../src/state/database.js" | |
| const tempProjectDirectories: string[] = [] | |
| function createTempProjectDirectory(): string { | |
| const directory = mkdtempSync(join(tmpdir(), "opencode-ceo-test-")) | |
| tempProjectDirectories.push(directory) | |
| return directory | |
| } | |
| export function cleanupTempProjectDirectories(): void { | |
| for (const directory of tempProjectDirectories) { | |
| try { | |
| rmSync(directory, { recursive: true, force: true }) | |
| } catch { | |
| // Ignore errors during cleanup to avoid failing tests on best-effort deletion. | |
| } | |
| } | |
| tempProjectDirectories.length = 0 | |
| } |
Summary
Verification