ci: clear the snapshots-and-artifacts lane — lint sweep and TUI snapshot re-record
Lint: eslint --fix over the merge-crossed projection/command files (arrow parens, trailing commas, unnecessary assertions), Extract<> replaces the keyof-map & string intersections no-redundant-type-constituents rejects, the fold-adapter's merge loop drops its non-null assertions for a bounds-carrying cursor, one JSDoc line wrapped under max-len (api-catalog regenerated). Snapshots: the four TUI goldens re-recorded for the merged event-count shift (the durable command lifecycle adds one event to the seeded diagnostics log). The headless advanced-toolchain snapshot passes on CI and fails locally in this sandbox both with and without these changes (30s child timeout — environment-bound, tracked in the ledger).
This commit is contained in:
@@ -204,10 +204,12 @@ export class FoldAdapter {
|
||||
const commands = [...this.commandIdx.values()]
|
||||
let next = 0
|
||||
for (const node of out) {
|
||||
while (next < commands.length && commands[next]!.seq < node.seq) nodes.push(commands[next++]!)
|
||||
for (let cmd = commands[next]; cmd !== undefined && cmd.seq < node.seq; cmd = commands[++next]) {
|
||||
nodes.push(cmd)
|
||||
}
|
||||
nodes.push(node)
|
||||
}
|
||||
while (next < commands.length) nodes.push(commands[next++]!)
|
||||
for (let cmd = commands[next]; cmd !== undefined; cmd = commands[++next]) nodes.push(cmd)
|
||||
}
|
||||
const value = { nodes, degraded: this.degraded }
|
||||
this.nodesResult = { rev: this.rev, value }
|
||||
|
||||
@@ -28,8 +28,8 @@ export type { SessionProjectionMap } from '@deepseek-ai/dsh-session-projection/t
|
||||
* only when a frame or baseline lands).
|
||||
*/
|
||||
export type UseProjection = {
|
||||
<K extends keyof SessionProjectionMap & string>(key: K): SessionProjectionMap[K] | undefined
|
||||
<K extends keyof SessionProjectionMap & string, S>(
|
||||
<K extends Extract<keyof SessionProjectionMap, string>>(key: K): SessionProjectionMap[K] | undefined
|
||||
<K extends Extract<keyof SessionProjectionMap, string>, S>(
|
||||
key: K,
|
||||
selector: (value: SessionProjectionMap[K] | undefined) => S,
|
||||
eq?: (a: S, b: S) => boolean,
|
||||
|
||||
@@ -45,12 +45,12 @@ describe('ProjectionValueStore semantics', () => {
|
||||
const store = new ProjectionValueStore()
|
||||
store.apply('test/marks', { marks: ['frame-20'] }, 20)
|
||||
// Stale cut: carried key loses to the newer frame; omitted key survives.
|
||||
store.seed({ asOfSeq: 10, values: { 'test/marks': { marks: ['baseline-10'] } } as never })
|
||||
store.seed({ asOfSeq: 10, values: { 'test/marks': { marks: ['baseline-10'] } } })
|
||||
expect(store.get('test/marks')).toEqual({ marks: ['frame-20'] })
|
||||
store.seed({ asOfSeq: 15, values: {} })
|
||||
expect(store.get('test/marks')).toEqual({ marks: ['frame-20'] })
|
||||
// Fresh cut: carried key reseeds…
|
||||
store.seed({ asOfSeq: 30, values: { 'test/marks': { marks: ['baseline-30'] } } as never })
|
||||
store.seed({ asOfSeq: 30, values: { 'test/marks': { marks: ['baseline-30'] } } })
|
||||
expect(store.get('test/marks')).toEqual({ marks: ['baseline-30'] })
|
||||
// …and an omitting fresh cut clears (capability absent as of the cut).
|
||||
store.seed({ asOfSeq: 40, values: {} })
|
||||
|
||||
Reference in New Issue
Block a user