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
5 changes: 3 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
acceptance criteria to their governed source ticket. Current state:
`IN_PROGRESS / PUBLICATION`.
- [ ] [`ticket-083`](project/ticket-083/README.md) — keep workspace comparison
artifacts and caches outside analysed repository state. Current state:
`IN_PROGRESS / PUBLICATION`.
artifacts bounded and outside analysed repository state; live `PLF-8091`
showed a generated Platform graph above the generic JSON ceiling. Current
state: `IN_PROGRESS / PUBLICATION`.
- [ ] [`ticket-084`](project/ticket-084/README.md) — honor explicit
deterministic NL mode in compare-workspace CLI. Current state:
`IN_PROGRESS / PUBLICATION`.
Expand Down
23 changes: 20 additions & 3 deletions project/ticket-083/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 33 additions & 0 deletions project/ticket-083/ai-codex-logs.txt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions project/ticket-083/ai-codex.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions project/ticket-083/changelog.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions project/ticket-083/intent.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions src/comparison/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ export const WORKSPACE_COMPARISON_DEADLINE_POLICY = Object.freeze({
maximumDeadlineMs: 40 * 60 * 1000,
});

// Generated graphs are denser than their source records. Platform currently
// produces a ~136 MiB graph, so the generic 128 MiB JSON ceiling rejects an
// artifact that the bounded pipeline has just produced. Keep a separate,
// explicit ceiling for the two comparison graphs instead of weakening the
// default limit for every JSON consumer.
export const WORKSPACE_COMPARISON_GRAPH_MAX_BYTES = 256 * 1024 * 1024;

export interface WorkspaceComparisonDeadlineLoad {
inputBytes: number;
llmWorkUnits: number;
Expand Down Expand Up @@ -203,8 +210,8 @@ export async function compareWorkspaceIntent(
throw error;
}
const [baseGraph, currentGraph, baseDiagnostics, currentDiagnostics] = await Promise.all([
readJson<IntentGraph>(baseRun.graphPath),
readJson<IntentGraph>(currentRun.graphPath),
readJson<IntentGraph>(baseRun.graphPath, WORKSPACE_COMPARISON_GRAPH_MAX_BYTES),
readJson<IntentGraph>(currentRun.graphPath, WORKSPACE_COMPARISON_GRAPH_MAX_BYTES),
readJson<DiagnosticReport>(baseRun.diagnosticsPath),
readJson<DiagnosticReport>(currentRun.diagnosticsPath),
]);
Expand Down
7 changes: 7 additions & 0 deletions test/workspace.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@ import {
calculateWorkspaceComparisonDeadline,
classifyWorkspaceTrend,
compareWorkspaceIntent,
WORKSPACE_COMPARISON_GRAPH_MAX_BYTES,
} from '../src/comparison/workspace.js';
import { pathExists, readJson } from '../src/core/io.js';
import type { PipelineManifest } from '../src/core/types.js';
import { makeConfig } from './helpers.js';

const exec = promisify(execFile);

test('workspace comparison has a bounded graph ceiling above large Platform evidence', () => {
const observedPlatformGraphBytes = 142_557_246;
assert.ok(WORKSPACE_COMPARISON_GRAPH_MAX_BYTES > observedPlatformGraphBytes);
assert.equal(WORKSPACE_COMPARISON_GRAPH_MAX_BYTES, 256 * 1024 * 1024);
});

test('workspace comparison deadline scales aggregate input and LLM work in bounded 2x steps', () => {
const baseline = calculateWorkspaceComparisonDeadline({ inputBytes: 128 * 1024, llmWorkUnits: 16 });
assert.equal(baseline.multiplier, 1);
Expand Down
Loading