@principles/core 1.177.4 → 1.177.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1804,6 +1804,19 @@ describe('PRI-111 ArtificerRunner boundary', () => {
1804
1804
  expect(src).toContain('ArtificerRuleOutputSchema');
1805
1805
  });
1806
1806
  });
1807
+ // ── PRI-458: PhilosopherRunner barrel boundary (MVP-Quiet) ─────────────────────
1808
+ describe('PRI-458 PhilosopherRunner barrel boundary', () => {
1809
+ it('BARREL_EXPORTS: internalization/index.ts does NOT export PhilosopherRunner (PRI-458 MVP-Quiet)', async () => {
1810
+ // PRI-458: PhilosopherRunner is de-surfaced from the internal barrel (MVP-Quiet).
1811
+ // It remains in runtime-v2/index.ts (public barrel) because rulehost-pipeline-runner.ts
1812
+ // imports it from there (EP-02 exception).
1813
+ const { readFileSync } = await import('node:fs');
1814
+ const { resolve } = await import('node:path');
1815
+ const src = readFileSync(resolve(__dirname, '..', 'internalization', 'index.ts'), 'utf-8');
1816
+ expect(src).not.toContain("from './philosopher-runner.js'");
1817
+ expect(src).not.toContain("from './philosopher-output.js'");
1818
+ });
1819
+ });
1807
1820
  // ── PRI-EVAL: EvaluatorRunner boundary guards ──────────────────────────────────
1808
1821
  describe('PRI-EVAL EvaluatorRunner boundary', () => {
1809
1822
  it('evaluator source files exist in internalization directory', async () => {
@@ -1844,13 +1857,17 @@ describe('PRI-EVAL EvaluatorRunner boundary', () => {
1844
1857
  expect(src).not.toContain('node:fs');
1845
1858
  expect(src).not.toContain('node:cron');
1846
1859
  });
1847
- it('BARREL_EXPORTS: internalization/index.ts exports EvaluatorRunner and EvaluatorOutput', async () => {
1860
+ it('BARREL_EXPORTS: internalization/index.ts does NOT export EvaluatorRunner (PRI-458 MVP-Quiet)', async () => {
1861
+ // PRI-458: EvaluatorRunner is de-surfaced from the internal barrel (MVP-Quiet).
1862
+ // It remains in runtime-v2/index.ts (public barrel) because rulehost-pipeline-runner.ts
1863
+ // imports it from there (EP-02 exception). These negative assertions lock the boundary:
1864
+ // if someone re-aggregates the evaluator exports into this barrel, the test will fail.
1848
1865
  const { readFileSync } = await import('node:fs');
1849
1866
  const { resolve } = await import('node:path');
1850
1867
  const src = readFileSync(resolve(__dirname, '..', 'internalization', 'index.ts'), 'utf-8');
1851
- expect(src).toContain('EvaluatorRunner');
1852
- expect(src).toContain('EvaluatorOutput');
1853
- expect(src).toContain('DefaultEvaluatorValidator');
1868
+ expect(src).not.toContain("from './evaluator-runner.js'");
1869
+ expect(src).not.toContain("from './evaluator-output.js'");
1870
+ expect(src).not.toContain("from './evaluator-prompt-builder.js'");
1854
1871
  });
1855
1872
  it('SCHEMA_REGISTRY: pi-ai-runtime-adapter.ts registers evaluator-output-v1 schema', async () => {
1856
1873
  const { readFileSync } = await import('node:fs');
@@ -1900,13 +1917,16 @@ describe('PRI-RR RolloutReviewerRunner boundary', () => {
1900
1917
  expect(src).not.toContain('node:fs');
1901
1918
  expect(src).not.toContain('node:cron');
1902
1919
  });
1903
- it('BARREL_EXPORTS: internalization/index.ts exports RolloutReviewerRunner and RolloutReviewerOutput', async () => {
1920
+ it('BARREL_EXPORTS: internalization/index.ts does NOT export RolloutReviewerRunner (PRI-458 MVP-Quiet)', async () => {
1921
+ // PRI-458: RolloutReviewerRunner is de-surfaced from the internal barrel (MVP-Quiet).
1922
+ // It remains in runtime-v2/index.ts (public barrel) because runtime-internalization-run-once.ts
1923
+ // imports it from there and package.json has no deep import path available (EP-02 exception).
1904
1924
  const { readFileSync } = await import('node:fs');
1905
1925
  const { resolve } = await import('node:path');
1906
1926
  const src = readFileSync(resolve(__dirname, '..', 'internalization', 'index.ts'), 'utf-8');
1907
- expect(src).toContain('RolloutReviewerRunner');
1908
- expect(src).toContain('RolloutReviewerOutput');
1909
- expect(src).toContain('DefaultRolloutReviewerValidator');
1927
+ expect(src).not.toContain("from './rollout-reviewer-runner.js'");
1928
+ expect(src).not.toContain("from './rollout-reviewer-output.js'");
1929
+ expect(src).not.toContain("from './rollout-reviewer-prompt-builder.js'");
1910
1930
  });
1911
1931
  it('SCHEMA_REGISTRY: pi-ai-runtime-adapter.ts registers rollout-reviewer-output-v1 schema', async () => {
1912
1932
  const { readFileSync } = await import('node:fs');
@@ -2176,12 +2196,14 @@ describe('PRI-117 Nocturnal god-class freeze', () => {
2176
2196
  expect(src).not.toContain('invokeStubScribe');
2177
2197
  }
2178
2198
  });
2179
- it('RUNTIME_V2_USES_PEER_RUNNERS: DreamerRunner/PhilosopherRunner/ScribeRunner are the canonical entry points', async () => {
2199
+ it('RUNTIME_V2_USES_PEER_RUNNERS: DreamerRunner/ScribeRunner/ArtificerRunner are the canonical MVP-Core entry points', async () => {
2200
+ // PRI-458: narrowed to MVP-Core runners only. PhilosopherRunner (MVP-Quiet)
2201
+ // remains in runtime-v2/index.ts for rulehost-pipeline-runner.ts compatibility
2202
+ // but is no longer asserted as a canonical entry point.
2180
2203
  const { readFileSync } = await import('node:fs');
2181
2204
  const { resolve } = await import('node:path');
2182
2205
  const src = readFileSync(resolve(__dirname, '..', 'index.ts'), 'utf-8');
2183
2206
  expect(src).toContain('DreamerRunner');
2184
- expect(src).toContain('PhilosopherRunner');
2185
2207
  expect(src).toContain('ScribeRunner');
2186
2208
  expect(src).toContain('ArtificerRunner');
2187
2209
  });