Skip to content

fix: stabilize CI runner compatibility and governance docs#4

Merged
vaur94 merged 4 commits intomainfrom
fix/ci-runner-compat
Mar 9, 2026
Merged

fix: stabilize CI runner compatibility and governance docs#4
vaur94 merged 4 commits intomainfrom
fix/ci-runner-compat

Conversation

@vaur94
Copy link
Owner

@vaur94 vaur94 commented Mar 9, 2026

Summary

  • fix chat pipeline orchestration so stages reuse the real session pipeline id
  • remove machine-specific test path assumptions that broke GitHub runners
  • align the PR guide with the protected-branch policy now enforced on main

Verification

  • bun run ci:verify

vaur94 and others added 3 commits March 9, 2026 04:26
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>
Copilot AI review requested due to automatic review settings March 9, 2026 01:26
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
@vaur94 vaur94 merged commit b55b21f into main Mar 9, 2026
3 checks passed
@vaur94 vaur94 deleted the fix/ci-runner-compat branch March 9, 2026 01:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.id for 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.

Comment on lines +4 to +13
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-"))
}

Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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
}

Copilot uses AI. Check for mistakes.
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