8000 [pull] main from can1357:main by pull[bot] · Pull Request #14 · ericrihm/oh-my-pi · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions packages/ai/test/issue-4593-repro.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import { buildModel } from "@oh-my-pi/pi-catalog/build";
// timer IS the unit under test), but never guess durations: the simulated local
// work completes only once the watchdog has demonstrably reached an expired
// deadline and consulted the local-work probe, so the tests stay causal on a
// loaded machine. Budgets are a few milliseconds.
// loaded machine. Budgets are tens of milliseconds — wide enough that a noisy
// virtualized CI runner cannot make a single scheduling hiccup span a full
// idle budget.

function createModel(): Model<"bedrock-converse-stream"> {
return buildModel({
Expand Down Expand Up @@ -71,7 +73,7 @@ describe("idle watchdog local-work deferral (issue #4593)", () => {
let idleFired = false;
const items: string[] = [];
for await (const item of iterateWithIdleTimeout(source(), {
idleTimeoutMs: 5,
idleTimeoutMs: 50,
errorMessage: "stalled",
onIdle: () => {
idleFired = true;
Expand Down Expand Up @@ -104,7 +106,7 @@ describe("idle watchdog local-work deferral (issue #4593)", () => {
let error: Error | undefined;
try {
for await (const item of iterateWithIdleTimeout(source(), {
idleTimeoutMs: 5,
idleTimeoutMs: 50,
errorMessage: "stalled",
hasPendingLocalWork: () => {
workDone.resolve();
Expand All @@ -131,8 +133,8 @@ describe("idle watchdog local-work deferral (issue #4593)", () => {
}
const items: string[] = [];
for await (const item of iterateWithIdleTimeout(source(), {
idleTimeoutMs: 5,
firstItemTimeoutMs: 5,
idleTimeoutMs: 50,
firstItemTimeoutMs: 50,
errorMessage: "stalled",
firstItemErrorMessage: "first event timed out",
hasPendingLocalWork: () => {
Expand Down Expand Up @@ -179,7 +181,7 @@ describe("idle watchdog local-work deferral (issue #4593)", () => {
},
});

const stream = streamBedrock(createModel(), baseContext, { streamIdleTimeoutMs: 5 });
const stream = streamBedrock(createModel(), baseContext, { streamIdleTimeoutMs: 50 });
const result = await stream.result();

expect(providerSignal?.aborted).toBe(false);
Expand Down
6 changes: 6 additions & 0 deletions packages/coding-agent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## [Unreleased]

## [17.3.7] - 2026-08-17

### Changed

- Send the `omp/<version>` User-Agent on xAI chat (`xai` and `xai-oauth`) unless the request already set its own ([#8840](https://github.com/can1357/oh-my-pi/pull/8840) by [@Jaaneek](https://github.com/Jaaneek)).

## [17.3.6] - 2026-08-17

### Added
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { VERSION } from "@oh-my-pi/pi-utils";
import { parseChangelog } from "../../src/utils/changelog";

const missingPackageChangelogPath = process.argv[2];
Expand All @@ -8,9 +7,13 @@ if (!missingPackageChangelogPath) {

const entries = await parseChangelog(missingPackageChangelogPath);
const latest = entries[0];
// The callers compare this output against a from-source run of the same probe,
// so the only local contract is "the bundled fallback asset parsed into a real
// release entry" — not that the latest entry matches the package version (a
// release may legally ship without coding-agent changelog content).
const version = latest ? `${latest.major}.${latest.minor}.${latest.patch}` : undefined;
if (version !== VERSION || !latest?.content.startsWith(`## [${VERSION}]`)) {
throw new Error(`Unexpected latest changelog release: ${JSON.stringify({ version, expected: VERSION })}`);
if (version === undefined || !latest?.content.startsWith(`## [${version}]`)) {
throw new Error(`Bundled changelog fallback did not parse a release entry: ${JSON.stringify({ version })}`);
}

process.stdout.write(JSON.stringify({ version, entries: entries.length }));
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { describe, expect, test } from "bun:test";
import * as fs from "node:fs/promises";
import * as os from "node:os";
import * as path from "node:path";
import { VERSION } from "@oh-my-pi/pi-utils";
import type { BunPlugin } from "bun";
import { resolveBundledChangelogPath } from "../../src/utils/changelog";

Expand Down Expand Up @@ -115,8 +114,8 @@ describe("changelog static import resources", () => {
unrelatedCwd,
);

expect(result.version).toBe(VERSION);
expect(result.entries).toBe(sourceResult.entries);
expect(result.version).toBe(sourceResult.version);
} finally {
await fs.rm(tempDir, { force: true, recursive: true });
}
Expand Down Expand Up @@ -147,8 +146,8 @@ describe("changelog static import resources", () => {
expect(buildOutput.success, buildOutput.logs.map(log => log.message).join("\n")).toBe(true);

const result = await runProbe([binaryPath, missingPackageChangelogPath], unrelatedCwd);
expect(result.version).toBe(VERSION);
expect(result.entries).toBe(sourceResult.entries);
expect(result.version).toBe(sourceResult.version);
} finally {
await fs.rm(tempDir, { force: true, recursive: true });
}
Expand Down
Loading
0