[codex] add harness engineering guardrails (#284)

* refactor: add harness engineering guardrails

* fix: address harness review feedback

---------

Co-authored-by: apple <apple@appledeMacBook-Pro.local>
This commit is contained in:
Cita
2026-03-26 21:22:36 +08:00
committed by GitHub
parent b3387dfba7
commit 8ebfc39745
16 changed files with 737 additions and 22 deletions
+22
View File
@@ -0,0 +1,22 @@
import { describe, expect, it } from 'vitest';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
describe('harness workflows', () => {
it('keeps repo drift checks wired into ci and scheduled reporting', () => {
const ciWorkflow = readFileSync(resolve(process.cwd(), '.github/workflows/ci.yml'), 'utf8');
const driftWorkflow = readFileSync(resolve(process.cwd(), '.github/workflows/harness-drift-report.yml'), 'utf8');
expect(ciWorkflow).toContain('name: Repo Drift Check');
expect(ciWorkflow).toContain('npm run repo:drift-check');
expect(ciWorkflow).toContain('name: Test Core');
expect(ciWorkflow).toContain('name: Build Web');
expect(ciWorkflow).toContain('name: Typecheck');
expect(driftWorkflow).toContain('schedule:');
expect(driftWorkflow).toContain('workflow_dispatch:');
expect(driftWorkflow).toContain('npm run repo:drift-check -- --format markdown --output tmp/repo-drift-report.md --report-only');
expect(driftWorkflow).toContain('actions/upload-artifact@v4');
expect(driftWorkflow).toContain('repo-drift-report');
});
});