@fro.bot/systematic 3.33.1 → 3.33.2

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.
package/HARNESSES.md CHANGED
@@ -106,14 +106,14 @@ Evidence tiers differ by host, and this file does not claim more than the tests
106
106
 
107
107
  ## Cross-project connections — researcher tool limits
108
108
 
109
- The `ce:connect` skill dispatches `connections-researcher`, an agent that must not run shell commands, write, edit or fetch. Each host enforces that differently, so a host and version counts as supported only after a deny was observed on that host: the shipped researcher is dispatched, a scripted model calls shell, write, edit and web fetch, each is refused, a read succeeds and reaches the parent, and the planted marker file is never written. A negative control removes the limits and the proof fails under its own name. The supported pairs are in `HOST_SUPPORT_TABLE` in `src/lib/connect-config.ts`; each row names the test that observed it in `observedBy`. A definition test is a regression pin and is never counted as proof.
109
+ The `ce:connect` skill dispatches `connections-researcher`, an agent that must not run shell commands, write, edit or fetch. Each host enforces that differently, so a host counts as supported only from the lowest version where a deny was observed on it (newer releases of the same major version follow): the shipped researcher is dispatched, a scripted model calls shell, write, edit and web fetch, each is refused, a read succeeds and reaches the parent, and the planted marker file is never written. A negative control removes the limits and the proof fails under its own name. The floors are in `HOST_SUPPORT_TABLE` in `src/lib/connect-config.ts`; each row names the test that observed it in `observedBy`. A prerelease, a version below the floor, a higher major version and a pair on the known-bad list in the same file are refused. A definition test is a regression pin and is never counted as proof.
110
110
 
111
111
  | Host | Mechanism | Support evidence |
112
112
  |---|---|---|
113
113
  | OpenCode v1 | `permission:` denies `bash`, `edit`, `webfetch`, `websearch` and `task`, plus `external_directory: allow` so a headless run can read allowed projects outside the working directory. Another config entry of the same agent name keeps only its `model` and `variant`; the denies and prompt are Systematic's. A string `tools:` is dropped by the host's converter and is not relied on. | Observed [CN-1] |
114
114
  | OpenCode v2 | The same denies, plus Systematic's `execute.before` tool guard, which refuses every call from `connections-researcher` outside `read`, `grep`, `glob`, `skill`, `systematic_search` and `systematic_skill`, direct or from inside Code Mode. A session-level allow overrides an agent's own deny on v2, so the guard does the enforcing. Another plugin's definition of the same agent name is replaced by Systematic's, keeping only its `model`; a definition in the user's own config applies after the plugin transforms and is not replaced. | Observed [CN-2][CN-3] |
115
115
  | Pi | The agent's `tools: Read, Grep, Glob` reach the delegate session as read, grep and find. The agent is not one of the curated pi-subagents personas, which carry no tool allowlist. | Observed [CN-4] |
116
- | Claude Code | The agent declares `tools: Read, Grep, Glob` and `disallowedTools`. The positive `tools` allowlist is what the host enforced in the manual run: the session's tools were Read, Grep and Glob. Upstream reports describe `disallowedTools` not being enforced for plugin subagents, so the allowlist leads. | Observed once, by hand, with a live model [CN-5]. Any other version is unlisted: headless mode refuses it and interactive mode warns and asks consent. |
116
+ | Claude Code | The agent declares `tools: Read, Grep, Glob` and `disallowedTools`. The positive `tools` allowlist is what the host enforced in the manual run: the session's tools were Read, Grep and Glob. Upstream reports describe `disallowedTools` not being enforced for plugin subagents, so the allowlist leads. | Observed once, by hand, with a live model [CN-5]. A version below it, a prerelease or another major version is not supported: headless mode refuses it and interactive mode warns and asks consent. Newer releases rest on this one observation. |
117
117
 
118
118
  What the evidence does not show: a scripted model makes the calls, so these proofs show enforcement plumbing, not live model choice. Read tools are not path-scoped on any host and session MCP tools are not denied; the guide documents both as limits. The v1 floor (1.18.29) has no row and is not run against this proof.
119
119
 
@@ -1,4 +1,4 @@
1
- import { type ConnectConfigOptions, type HostSupportRow } from './lib/connect-config.js';
1
+ import { type ConnectConfigOptions, type HostSupportRow, type KnownBadHostVersion } from './lib/connect-config.js';
2
2
  import { type ConnectBounds } from './lib/connect-evidence.js';
3
3
  import { type InvocationWriteOptions, type ProcessTable, type PublishOptions } from './lib/connect-state.js';
4
4
  /**
@@ -29,6 +29,8 @@ export interface HelperDeps {
29
29
  /** The pid recorded as the lock holder. Defaults to the nearest non-shell ancestor. */
30
30
  readonly holderPid?: number;
31
31
  readonly hostTable?: readonly HostSupportRow[];
32
+ /** Host and version pairs refused as known-bad. Defaults to the shipped list. */
33
+ readonly knownBadHosts?: readonly KnownBadHostVersion[];
32
34
  readonly gitBinary?: string;
33
35
  readonly bounds?: Partial<ConnectBounds>;
34
36
  readonly inspector?: ProcessInspector;
@@ -178,13 +178,16 @@ export declare function resolveAllowList(entries: readonly string[], options?: A
178
178
  export declare const CONNECT_HOSTS: readonly ['opencode-v1', 'opencode-v2', 'pi', 'claude-code'];
179
179
  export type ConnectHost = (typeof CONNECT_HOSTS)[number];
180
180
  /**
181
- * One host and exact version with host-specific evidence that the researcher's
182
- * tool limits hold. The evidence is a real-host refusal test, a test showing the
183
- * allowlist reaching the delegate session, or a recorded manual observation.
184
- * `observedBy` names it. A test is named as `<file> > <test title>`. A manual
185
- * observation is named as `HARNESSES.md > <entry id>`; a unit test requires that
186
- * entry to exist and to be marked manual evidence. A row without `observedBy`
187
- * never matches.
181
+ * One host and the lowest version where the researcher's tool limits were
182
+ * observed to hold, with the host-specific evidence. The evidence is a
183
+ * real-host refusal test, a test showing the allowlist reaching the delegate
184
+ * session, or a recorded manual observation. `observedBy` names it. A test is
185
+ * named as `<file> > <test title>`. A manual observation is named as
186
+ * `HARNESSES.md > <entry id>`; a unit test requires that entry to exist and to
187
+ * be marked manual evidence. A row without `observedBy` supports nothing.
188
+ *
189
+ * `version` is a floor, not an exact match: it and every newer release in the
190
+ * same major version are supported (see `checkHostSupport`).
188
191
  */
189
192
  export interface HostSupportRow {
190
193
  readonly host: ConnectHost;
@@ -192,28 +195,79 @@ export interface HostSupportRow {
192
195
  readonly observedBy: string;
193
196
  }
194
197
  /**
195
- * The supported combinations. A row is added only for a host and version with
196
- * host-specific evidence that the shipped agent's tool limits hold there: a
197
- * real-host refusal test, an allowlist reaching the delegate session, or a
198
- * recorded manual observation marked as manual evidence. The `claude-code` row
199
- * rests on a recorded manual tool-list observation, not a tested refusal,
200
- * because that host cannot be driven by a scripted model here.
198
+ * A host and exact version where the proof failed: the researcher's tool limits
199
+ * were seen not to hold. It is refused even when a row's floor is below it.
200
+ * `evidence` records where the failure was seen. It is documentation: a
201
+ * listed pair is refused whatever the text says.
202
+ */
203
+ export interface KnownBadHostVersion {
204
+ readonly host: ConnectHost;
205
+ readonly version: string;
206
+ readonly evidence: string;
207
+ }
208
+ /**
209
+ * The supported hosts, one floor per host. A row is added only for a host with
210
+ * host-specific evidence that the shipped agent's tool limits hold: a real-host
211
+ * refusal test, an allowlist reaching the delegate session, or a recorded
212
+ * manual observation marked as manual evidence. The `claude-code` row rests on
213
+ * a recorded manual tool-list observation, not a tested refusal, because that
214
+ * host cannot be driven by a scripted model here.
201
215
  *
202
- * Every row is exact: the version is the one the proof ran against, and any
203
- * other version, older or newer, is unlisted.
216
+ * Each `version` is the lowest version where the limits were observed. That
217
+ * version and any newer release of the same host and major version is
218
+ * supported, so a host update does not need a Systematic release. A row does
219
+ * not follow the host pins that the host contract tests run against: raise or
220
+ * add a row only when the limits are observed on a different release, and put a
221
+ * release that fails the proof in `KNOWN_BAD_HOST_VERSIONS`.
204
222
  */
205
223
  export declare const HOST_SUPPORT_TABLE: readonly HostSupportRow[];
224
+ /**
225
+ * Host and version pairs where the proof failed. Each is refused with the
226
+ * reason `known-bad`, even above its host's floor, and in every mode: unlike
227
+ * the other refusals, no consent runs it. Empty until a release is seen to
228
+ * break the tool limits.
229
+ */
230
+ export declare const KNOWN_BAD_HOST_VERSIONS: readonly KnownBadHostVersion[];
206
231
  export type HostSupportVerdict = {
207
232
  readonly supported: true;
208
233
  readonly row: HostSupportRow;
209
234
  } | {
210
235
  readonly supported: false;
211
- /** `unobserved`: no usable version. `unlisted`: no row names this host and version. */
212
- readonly reason: 'unobserved' | 'unlisted';
236
+ /**
237
+ * `unobserved`: no usable version, or one that is not dotted numbers.
238
+ * `unlisted`: no row covers this host, or the version is a prerelease or
239
+ * in a major version no row names.
240
+ * `below-floor`: older than the lowest version observed for the host.
241
+ * `known-bad`: the pair is on the known-bad list.
242
+ */
243
+ readonly reason: 'unobserved' | 'unlisted' | 'below-floor' | 'known-bad';
213
244
  };
214
245
  /**
215
- * Check an observed host and version against the table. The match is exact:
216
- * a version that is not listed is refused, whether older or newer. A pair the
217
- * skill could not observe is unsupported.
246
+ * A version as the skill reports it: trimmed, one leading `v` dropped, and
247
+ * SemVer build metadata (everything from the first `+`) cut off, because build
248
+ * metadata does not change which release a build is. A prerelease tag stays,
249
+ * so `1.19.5-rc.1` is not `1.19.5`. `undefined` when no version is left.
250
+ */
251
+ export declare function normalizeVersion(version: unknown): string | undefined;
252
+ /**
253
+ * Check an observed host and version against the table. The rule, in order:
254
+ *
255
+ * 1. A version that is missing or is not dotted numbers (`2.2.9`, optionally
256
+ * with a `-` prerelease tag after it) is `unobserved`.
257
+ * 2. A host and version on the known-bad list is refused as `known-bad`.
258
+ * 3. A version equal to a row's version is supported.
259
+ * 4. A prerelease (`2.2.8-rc.1`) is refused as `unlisted` unless it equals a
260
+ * row exactly: a prerelease is not a release the proof ran against.
261
+ * 5. Otherwise the row's version is a floor within its own major version. The
262
+ * version is supported when some row of the host has the same major and a
263
+ * version at or below it; the row with the highest such version is
264
+ * returned. A version below that floor is `below-floor`. A higher major
265
+ * version has no row of its own, so it is `unlisted`: OpenCode v1 and v2
266
+ * are already separate hosts, and a new major version is a new host to
267
+ * prove, not an update.
268
+ * 6. A host no row names is `unlisted`.
269
+ *
270
+ * Parts compare as numbers (`2.2.10` is newer than `2.2.9`) and build
271
+ * metadata is ignored, as `normalizeVersion` drops it.
218
272
  */
219
- export declare function checkHostSupport(host: unknown, version: unknown, table?: readonly HostSupportRow[]): HostSupportVerdict;
273
+ export declare function checkHostSupport(host: unknown, version: unknown, table?: readonly HostSupportRow[], knownBad?: readonly KnownBadHostVersion[]): HostSupportVerdict;
@@ -343,6 +343,11 @@ export interface DigestModel {
343
343
  readonly host?: string;
344
344
  readonly version?: string;
345
345
  readonly consented?: boolean;
346
+ /**
347
+ * The version the tool denies were observed on, set only when the run's
348
+ * version is a different, newer release that the host row supports.
349
+ */
350
+ readonly observedOn?: string;
346
351
  };
347
352
  readonly degradeReasons: readonly string[];
348
353
  /** What the run was narrowed to. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fro.bot/systematic",
3
- "version": "3.33.1",
3
+ "version": "3.33.2",
4
4
  "description": "Compound-engineering loops for OpenCode, Pi, and Claude Code",
5
5
  "type": "module",
6
6
  "homepage": "https://fro.bot/systematic",
@@ -73,7 +73,7 @@ The helper needs node 18 or newer. Check `node --version` once. If node is missi
73
73
 
74
74
  Shell state does not persist between tool calls. Start every block that calls the helper with the same two anchor lines, with `SKILL_DIR` set to the skill directory stated when this skill loads.
75
75
 
76
- Observe the host and its version. The helper holds the list of host and version pairs where the researcher's tool limits were seen to work, and it checks the pair you report against it.
76
+ Observe the host and its version. For each host, the helper holds the lowest version where the researcher's tool limits were seen to work. It supports that version and any newer release of the same major version, and it checks the pair you report against that.
77
77
 
78
78
  | Host you are running in | `host` | Run |
79
79
  |---|---|---|
@@ -82,7 +82,7 @@ Observe the host and its version. The helper holds the list of host and version
82
82
  | Pi | `pi` | `pi --version` |
83
83
  | The `claude` command line tool | `claude-code` | `claude --version` |
84
84
 
85
- Send `version` as the first token the command prints that starts with a digit (after an optional `v`), exactly as printed. Keep any `-` prerelease tag or `+` build suffix: the helper ignores build suffixes and keeps prerelease tags, so you decide neither. Never trim, round or strip any part of it. `claude --version` prints the version and then a name in parentheses, such as `2.1.319 (...)`: send `2.1.319`, not the whole line. If you cannot tell which host this is, or the command fails or prints no version, leave `version` out or use the host id `unknown`. Never guess a host or a version: a pair the helper cannot check counts as unsupported.
85
+ Send `version` as the first token the command prints that starts with a digit (after an optional `v`), exactly as printed. Keep any `-` prerelease tag or `+` build suffix: the helper ignores build suffixes and does not support a prerelease version, so you decide neither. Never trim, round or strip any part of it. `claude --version` prints the version and then a name in parentheses, such as `2.1.319 (...)`: send `2.1.319`, not the whole line. If you cannot tell which host this is, or the command fails or prints no version, leave `version` out or use the host id `unknown`. Never guess a host or a version: a pair the helper cannot check counts as unsupported.
86
86
 
87
87
  Report what you observed, in one line, so the user can see it.
88
88
 
@@ -101,8 +101,8 @@ When Step 1 found selection words, add `"selection": ["<word>", "<word>"]` to th
101
101
  The helper answers one line of JSON. Read `outcome` or `status`:
102
102
 
103
103
  - `begun`: the lock is held. Note `runId`, `lock`, `workDir`, `rulesFile`, `rulesOverview`, `filesIndex`, `selection`, `projects`, `unmatched`, `ruleCount`, `offeredRuleIds`, `offeredCount`, `sweep`, `bounds`, `degradeReasons` and `unread`. Go on.
104
- - `consent-required` (interactive mode): the host and version have no observed deny. Show the helper's `warning` as it is and ask the user whether to run anyway. Wait for the answer. On a clear yes, run `begin` again with `"consent": true` added. On anything else, print `consent-declined` as the reason, then `Connect failed`. No lock was taken.
105
- - `unsupported-host` (headless mode, a `failed` outcome): print it with the helper's `hostSupport`, then `Connect failed`. Headless mode never asks for consent.
104
+ - `consent-required` (interactive mode): the host and version are not supported, so no deny was observed for them. The helper's `hostSupport` says why. Show the helper's `warning` as it is and ask the user whether to run anyway. Wait for the answer. On a clear yes, run `begin` again with `"consent": true` added. On anything else, print `consent-declined` as the reason, then `Connect failed`. No lock was taken.
105
+ - `unsupported-host` (headless mode, a `failed` outcome): print it with the helper's `hostSupport`, then `Connect failed`. Headless mode never asks for consent. In interactive mode the same answer with `hostSupport` `known-bad` means the version failed the check: print it, then `Connect failed`. Consent cannot run it, so do not offer to.
106
106
  - `busy`: print the helper's `reason` and `hint`, then `Connect busy`. Nothing was written. Never run `ledger unlock` yourself on a `busy` answer. In interactive mode you may tell the user that it exists (see `references/headless-and-outcomes.md`).
107
107
  - A selection refusal, a `failed` outcome with one of these reasons: `conflicting-selection` (with `detail`), `unknown-group` (`group`), `unknown-project` (`project`), `ambiguous-project` (`project` and `keys`; the user can name one of the keys instead), `group-member-not-allowed` (`group`, `member`, and `memberReason` when the member did not resolve) or `invalid-request` for a malformed word. Print the `reason` and the fields it names, then `Connect failed`. No lock was taken and nothing was written, so there is nothing to abort or unlock. Never retry with a different selection and never fall back to the whole allow list: the user asked for a narrower run.
108
108
  - Any other `failed` outcome, including `no-allowed-projects` and `state-root-refused`: print the `reason`, add each `unmatched` entry with its reason when there are any, then `Connect failed`.
@@ -51,7 +51,7 @@ A stop here happens before any command. End as for a failed run: the reason on a
51
51
 
52
52
  Headless mode asks no question and offers nothing after the digest. It does not wait for input of any kind.
53
53
 
54
- - A host and version pair the helper does not list is refused: `begin` answers `unsupported-host`. Interactive mode asks consent instead.
54
+ - A host and version the helper does not support is refused: `begin` answers `unsupported-host`. Supported means the lowest version where the tool limits were observed, or any newer release of the same host and major version. A version below that, a prerelease, an unknown host, a version the helper cannot read and a release on its known-bad list are all refused. Interactive mode asks consent instead, except for a known-bad release: that is refused in every mode, and consent does not change it.
55
55
  - A user decision (`decide`) is never taken. The digest is the only output.
56
56
  - Anything unclear is a stop with a reason, not a question.
57
57
 
@@ -95,7 +95,7 @@ Print the helper's `reason` as it is, then add the hint when one fits.
95
95
  | Reason | Hint |
96
96
  |---|---|
97
97
  | `helper-unavailable` | The skill could not start the helper (node is missing or the helper file is gone). Nothing was published. Not a data problem. |
98
- | `unsupported-host` | The host and version have no observed tool limits. Run interactively and accept the warning, or use a supported host. |
98
+ | `unsupported-host` | The host and version are not supported. The helper's `hostSupport` says why: `below-floor` (older than the lowest version with observed tool limits), `unlisted` (an unknown host, a prerelease, or a major version no row covers), `unobserved` (no readable version) or `known-bad` (a release where the limits were seen to fail). Run interactively and accept the warning, or use a supported host. A `known-bad` version cannot be run at all, in any mode, even with consent: use a different version of the host. |
99
99
  | `no-allowed-projects` | The allow list is empty or no entry matched a project. List the entries that did not match, with the reason the helper gives for each. |
100
100
  | `conflicting-selection` | The words name more than one selection. The helper's `detail` says which combination. Use one `group:` word, or one `projects:` word. A `fetch:` word stands alone. |
101
101
  | `unknown-group` | No group of that name is in the user's config (`group`). |
@@ -2,7 +2,7 @@
2
2
  // biome-ignore-all assist/source/organizeImports: generated bundle
3
3
  // Generated by scripts/generate-ce-connect-helper.ts; do not edit by hand.
4
4
  // Run `bun run ce-connect-helper:build` to regenerate.
5
- // source-digest: 1dff040830b364bc15183c7ac02704b38be2eeff00e226e50e74817dea36bf40
5
+ // source-digest: 88c88308f918761b669816ad82892c1533d1f46c86b71eeab1433d2e9663f381
6
6
  // src/ce-connect-helper.ts
7
7
  import { spawnSync as spawnSync3 } from 'node:child_process'
8
8
  import fs10 from 'node:fs'
@@ -1473,13 +1473,13 @@ var HOST_SUPPORT_TABLE = [
1473
1473
  },
1474
1474
  {
1475
1475
  host: 'opencode-v2',
1476
- version: '2.2.7',
1476
+ version: '2.2.5',
1477
1477
  observedBy:
1478
1478
  'tests/integration/opencode-v2.test.ts > a session-level allow does not lift the guarded researcher when a parent with that rule dispatches it',
1479
1479
  },
1480
1480
  {
1481
1481
  host: 'pi',
1482
- version: '1.5.2',
1482
+ version: '1.5.0',
1483
1483
  observedBy:
1484
1484
  'tests/unit/pi-delegate-session.test.ts > the shipped researcher reaches createAgentSession with read, grep and find and none of bash, write, edit or systematic_delegate',
1485
1485
  },
@@ -1489,6 +1489,7 @@ var HOST_SUPPORT_TABLE = [
1489
1489
  observedBy: 'HARNESSES.md > CN-5',
1490
1490
  },
1491
1491
  ]
1492
+ var KNOWN_BAD_HOST_VERSIONS = []
1492
1493
  function normalizeVersion(version) {
1493
1494
  if (typeof version !== 'string') return
1494
1495
  const withoutV = version.trim().replace(/^v/i, '')
@@ -1496,19 +1497,92 @@ function normalizeVersion(version) {
1496
1497
  const core = (plus === -1 ? withoutV : withoutV.slice(0, plus)).trim()
1497
1498
  return core === '' ? undefined : core
1498
1499
  }
1499
- function checkHostSupport(host, version, table = HOST_SUPPORT_TABLE) {
1500
+ var VERSION_SHAPE = /^(\d+(?:\.\d+)*)(-[0-9A-Za-z.-]+)?$/
1501
+ function parseVersion(version) {
1502
+ if (version === undefined) return
1503
+ const match = VERSION_SHAPE.exec(version)
1504
+ const core = match?.[1]
1505
+ if (core === undefined) return
1506
+ return { parts: core.split('.'), prerelease: match?.[2] !== undefined }
1507
+ }
1508
+ function comparePart(a, b) {
1509
+ const left = a.replace(/^0+(?=\d)/, '')
1510
+ const right = b.replace(/^0+(?=\d)/, '')
1511
+ if (left.length !== right.length) return left.length < right.length ? -1 : 1
1512
+ if (left === right) return 0
1513
+ return left < right ? -1 : 1
1514
+ }
1515
+ function compareParts(a, b) {
1516
+ const length = Math.max(a.length, b.length)
1517
+ for (let index = 0; index < length; index += 1) {
1518
+ const order = comparePart(a[index] ?? '0', b[index] ?? '0')
1519
+ if (order !== 0) return order
1520
+ }
1521
+ return 0
1522
+ }
1523
+ function highestFloorBelow(floors, parts) {
1524
+ let best
1525
+ for (const floor of floors) {
1526
+ if (compareParts(floor.parts, parts) > 0) continue
1527
+ if (best === undefined || compareParts(floor.parts, best.parts) > 0) {
1528
+ best = floor
1529
+ }
1530
+ }
1531
+ return best
1532
+ }
1533
+ function checkFloors(floors, parts) {
1534
+ const sameMajor = floors.filter(
1535
+ (floor) => comparePart(floor.parts[0] ?? '0', parts[0] ?? '0') === 0,
1536
+ )
1537
+ if (sameMajor.length > 0) {
1538
+ const best = highestFloorBelow(sameMajor, parts)
1539
+ return best === undefined
1540
+ ? { supported: false, reason: 'below-floor' }
1541
+ : { supported: true, row: best.row }
1542
+ }
1543
+ const belowEveryFloor =
1544
+ floors.length > 0 &&
1545
+ floors.every((floor) => compareParts(parts, floor.parts) < 0)
1546
+ return {
1547
+ supported: false,
1548
+ reason: belowEveryFloor ? 'below-floor' : 'unlisted',
1549
+ }
1550
+ }
1551
+ function checkHostSupport(
1552
+ host,
1553
+ version,
1554
+ table = HOST_SUPPORT_TABLE,
1555
+ knownBad = KNOWN_BAD_HOST_VERSIONS,
1556
+ ) {
1500
1557
  const observed = normalizeVersion(version)
1501
- if (observed === undefined) return { supported: false, reason: 'unobserved' }
1502
- const row = table.find(
1558
+ const parsed = parseVersion(observed)
1559
+ if (observed === undefined || parsed === undefined) {
1560
+ return { supported: false, reason: 'unobserved' }
1561
+ }
1562
+ if (
1563
+ knownBad.some(
1564
+ (entry) =>
1565
+ entry.host === host && normalizeVersion(entry.version) === observed,
1566
+ )
1567
+ ) {
1568
+ return { supported: false, reason: 'known-bad' }
1569
+ }
1570
+ const rows = table.filter(
1503
1571
  (candidate) =>
1504
1572
  candidate.host === host &&
1505
1573
  typeof candidate.observedBy === 'string' &&
1506
- candidate.observedBy.trim() !== '' &&
1507
- normalizeVersion(candidate.version) === observed,
1574
+ candidate.observedBy.trim() !== '',
1575
+ )
1576
+ const exact = rows.find(
1577
+ (candidate) => normalizeVersion(candidate.version) === observed,
1508
1578
  )
1509
- return row === undefined
1510
- ? { supported: false, reason: 'unlisted' }
1511
- : { supported: true, row }
1579
+ if (exact !== undefined) return { supported: true, row: exact }
1580
+ if (parsed.prerelease) return { supported: false, reason: 'unlisted' }
1581
+ const floors = rows.flatMap((row) => {
1582
+ const floor = parseVersion(normalizeVersion(row.version))
1583
+ return floor === undefined ? [] : [{ row, parts: floor.parts }]
1584
+ })
1585
+ return checkFloors(floors, parsed.parts)
1512
1586
  }
1513
1587
 
1514
1588
  // src/lib/connect-evidence.ts
@@ -6748,7 +6822,11 @@ function renderCandidate(item, index) {
6748
6822
  function hostLine(model) {
6749
6823
  const host = model.hostSupport
6750
6824
  const name = inline(`${host.host ?? 'unknown'} ${host.version ?? ''}`.trim())
6751
- if (host.supported) return `Host: ${name} (tool denies observed)`
6825
+ if (host.supported) {
6826
+ return host.observedOn === undefined
6827
+ ? `Host: ${name} (tool denies observed)`
6828
+ : `Host: ${name} (tool denies observed on ${inline(host.observedOn)}, not on this version)`
6829
+ }
6752
6830
  const agreed =
6753
6831
  host.consented === true ? '; the user agreed to run anyway' : ''
6754
6832
  return `Host: ${name} (tool denies NOT verified on this host${agreed})`
@@ -10825,14 +10903,22 @@ function releaseAndFail(op, lock, root, runId, reason, extra = {}) {
10825
10903
  function hostPhrase(host, version) {
10826
10904
  return version === undefined ? host : `${host} ${version}`
10827
10905
  }
10906
+ function observedOnFor(verdict, version) {
10907
+ if (!verdict.supported) return {}
10908
+ const row = verdict.row.version
10909
+ return normalizeVersion(version) === normalizeVersion(row)
10910
+ ? {}
10911
+ : { observedOn: row }
10912
+ }
10828
10913
  function gateHost(parsed, deps) {
10829
10914
  const verdict = checkHostSupport(
10830
10915
  parsed.host,
10831
10916
  parsed.version,
10832
10917
  deps.hostTable ?? HOST_SUPPORT_TABLE,
10918
+ deps.knownBadHosts,
10833
10919
  )
10834
10920
  if (verdict.supported) return verdict
10835
- if (parsed.mode === 'headless') {
10921
+ if (parsed.mode === 'headless' || verdict.reason === 'known-bad') {
10836
10922
  return failure2('begin', 'unsupported-host', {
10837
10923
  host: parsed.host,
10838
10924
  version: parsed.version ?? null,
@@ -10997,6 +11083,7 @@ function indexRun(setup, deps) {
10997
11083
  host: parsed.host,
10998
11084
  ...(parsed.version === undefined ? {} : { version: parsed.version }),
10999
11085
  ...(verdict.supported ? {} : { consented: true }),
11086
+ ...observedOnFor(verdict, parsed.version),
11000
11087
  },
11001
11088
  lock: { nonce: lock.nonce, pid: lock.pid },
11002
11089
  holder: setup.holder,