Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
e759cf1
feat(task): per-task file observation registry (A2, #1375)
easonliang28 Aug 27, 2026
604c309
chore(ci): empty commit — re-trigger CI and the CodeRabbit current-he…
easonliang28 Aug 30, 2026
e15883e
test(registry): restore fake timers in teardown and cover token-looku…
easonliang28 Sep 14, 2026
2b00c7f
test(registry): assert read content in the token-failure regression t…
easonliang28 Sep 23, 2026
942106e
chore(ci): empty commit — trigger the CodeRabbit review at head (chat…
Oct 5, 2026
84e4b2c
fix(observation): drop a stale observation when a later token lookup …
Oct 6, 2026
9ac44d1
test(core): drop a stale observation when the version token is unreso…
easonLiangWorldedtech Nov 4, 2026
beee677
test(core): cover observation-registry privacy across a parent and su…
easonLiangWorldedtech Nov 4, 2026
447adca
fix(tools): take the read version token before the read, and pin the …
easonLiangWorldedtech Nov 5, 2026
5c34f0a
test(tools): pin the legacy token order and fold the stat double
easonLiangWorldedtech Nov 7, 2026
d94f0b6
dedupe the observation registry declarations that the rebase auto-mer…
easonLiangWorldedtech Nov 11, 2026
b06fc71
test(core): measure the registry in the token-failure rows
easonLiangWorldedtech Nov 11, 2026
6f53ea3
refactor(task): drop the registry accessors no production code calls
easonLiangWorldedtech Nov 11, 2026
d6580fe
test(task): re-express the disposed-registry assertions through get
easonLiangWorldedtech Nov 11, 2026
951c5e2
test(core): measure the failed-lookup claim on the observe entry point
easonLiangWorldedtech Nov 11, 2026
0605862
test(core): restore the absent-path row that pins a failed read leavi…
easonLiangWorldedtech Nov 12, 2026
f4f5ef6
fix(tools): carry read completeness into the observation (A2, #1375)
easonLiangWorldedtech Nov 14, 2026
37ae1c9
test(task): restore the post-close absence assertion on the late observe
easonLiangWorldedtech Nov 29, 2026
6f96d51
test(tools): clear the seed read result so the warm-state assertions …
easonLiangWorldedtech Nov 29, 2026
178315b
test(tools): cover the untruncated partial read so completeness canno…
easonLiangWorldedtech Nov 29, 2026
517f539
fix(tools): reject fractional legacy line range endpoints before they…
easonLiangWorldedtech Nov 29, 2026
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
11 changes: 5 additions & 6 deletions src/core/task/__tests__/Task.dispose.test.ts

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

40 changes: 40 additions & 0 deletions src/core/task/__tests__/Task.spec.ts

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

91 changes: 47 additions & 44 deletions src/core/task/__tests__/observationRegistry.spec.ts

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

22 changes: 12 additions & 10 deletions src/core/task/observationRegistry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
* Pure in-memory — zero I/O, no dependencies. The S4 guarded-write consults
* these observations for the version check and for the completeness check that
* gates a full-file replacement.
*
* Only observe, forget and get are exposed: the S4 guard is the only named consumer. A
* per-task instance needs no reset - the next task constructs a new registry - so has, size
* and clear land with whoever needs them (a registry shared across tasks would need the
* reset, and that is not decided yet).
*/

export interface FileObservation {
Expand Down Expand Up @@ -52,12 +57,13 @@ export class ObservationRegistry {
return this.entries.get(absolutePath)
}

has(absolutePath: string): boolean {
return this.entries.has(absolutePath)
}

clear(): void {
this.entries.clear()
/**
* Drop the observation for a file. A read that cannot compute a version token must not
* leave an earlier entry behind, because the write guard would then compare against a
* token that no longer describes the last read.
*/
forget(absolutePath: string): boolean {
return this.entries.delete(absolutePath)
}

/**
Expand All @@ -77,8 +83,4 @@ export class ObservationRegistry {
get closed(): boolean {
return this.retired
}

get size(): number {
return this.entries.size
}
}
Loading
Loading