Merge remote-tracking branch 'origin/master' into feat/read-image-context
This commit is contained in:
@@ -113,20 +113,42 @@ describe('E2B e2e workflow', () => {
|
||||
})
|
||||
|
||||
describe('Issue lifecycle workflow', () => {
|
||||
it('uses review signals instead of rerunning when a draft becomes ready', () => {
|
||||
it('uses explicit review handoff events without rerunning when a draft becomes ready', () => {
|
||||
const lifecycle = loadWorkflow('.github/workflows/issue-lifecycle.yml')
|
||||
const lifecyclePullRequest = workflowEvent(lifecycle, 'pull_request')
|
||||
const lifecycleReview = workflowEvent(lifecycle, 'pull_request_review')
|
||||
const lifecycleJob = workflowJob(lifecycle, 'lifecycle')
|
||||
const policy = loadWorkflow('.github/workflows/issue-policy.yml')
|
||||
const policyPullRequest = workflowEvent(policy, 'pull_request')
|
||||
|
||||
expect(lifecyclePullRequest.types).not.toContain('ready_for_review')
|
||||
expect(lifecyclePullRequest.types).toContain('review_requested')
|
||||
expect(lifecycleReview.types).toContain('submitted')
|
||||
expect(lifecycleReview.types).toEqual(['submitted'])
|
||||
expect(lifecycleJob.if).toBe(
|
||||
"${{ github.event_name != 'pull_request_review' || (github.event.action == 'submitted' && github.event.review.state == 'changes_requested') }}",
|
||||
)
|
||||
expect(policyPullRequest.types).toContain('ready_for_review')
|
||||
})
|
||||
})
|
||||
|
||||
describe('Git hooks', () => {
|
||||
it('leaves frozen Agent Note sidecars to the archive verifier', () => {
|
||||
const lefthook = loadWorkflow('lefthook.yml')
|
||||
|
||||
for (const hookName of ['pre-commit', 'pre-merge-commit']) {
|
||||
const hook = lefthook[hookName]
|
||||
if (!isRecord(hook) || !Array.isArray(hook.jobs)) {
|
||||
throw new TypeError(`lefthook must define ${hookName} jobs`)
|
||||
}
|
||||
const pairing: unknown = hook.jobs.find(
|
||||
(job: unknown) => isRecord(job) && job.name === 'translation pairing (staged records)',
|
||||
)
|
||||
|
||||
expect(pairing).toMatchObject({ exclude: ['.agents/notes/archived/**'] })
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
function loadWorkflow(path: string): Record<string, unknown> {
|
||||
const workflow: unknown = yaml.load(readFileSync(resolve(root, path), 'utf8'))
|
||||
if (!isRecord(workflow)) throw new TypeError(`${path} must define a workflow`)
|
||||
@@ -140,6 +162,13 @@ function workflowEvent(workflow: Record<string, unknown>, event: string): Record
|
||||
return workflow.on[event]
|
||||
}
|
||||
|
||||
function workflowJob(workflow: Record<string, unknown>, job: string): Record<string, unknown> {
|
||||
if (!isRecord(workflow.jobs) || !isRecord(workflow.jobs[job])) {
|
||||
throw new TypeError(`workflow must define the ${job} job`)
|
||||
}
|
||||
return workflow.jobs[job]
|
||||
}
|
||||
|
||||
function isRecord(value: unknown): value is Record<string, unknown> {
|
||||
return typeof value === 'object' && value !== null && !Array.isArray(value)
|
||||
}
|
||||
@@ -1620,6 +1620,11 @@
|
||||
"symbol": "WebBootGraph",
|
||||
"source": "packages/client/modules/src/client/manifest.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/telemetry.md",
|
||||
"symbol": "TelemetrySharingStatus",
|
||||
"source": "packages/session/session-telemetry/src/index.ts"
|
||||
},
|
||||
{
|
||||
"doc": "docs/subsystems/telemetry.md",
|
||||
"symbol": "TelemetrySeverity",
|
||||
|
||||
Reference in New Issue
Block a user