refactor(daemon): rename reflex-scheduler → sense-scheduler
Rename ReflexScheduler to SenseScheduler, update all file names, imports, comments, test descriptions, and log source values. Fixes #202
This commit is contained in:
@@ -31,7 +31,13 @@ describe("LogStore — cold archive (RFC-001 §5.4)", () => {
|
||||
it("exports one UTC day to JSONL, deletes rows, advances archived_up_to", () => {
|
||||
const ts = Date.UTC(2026, 1, 1, 10, 0, 0);
|
||||
store.append({ source: "system", type: "x", refId: null, payload: '{"a":1}', timestamp: ts });
|
||||
store.append({ source: "reflex", type: "y", refId: "z", payload: null, timestamp: ts + 1 });
|
||||
store.append({
|
||||
source: "sense_scheduler",
|
||||
type: "y",
|
||||
refId: "z",
|
||||
payload: null,
|
||||
timestamp: ts + 1,
|
||||
});
|
||||
|
||||
const now = nowForLastArchivableFeb1();
|
||||
const result = store.archiveLogs({ now, retentionMs: 30 * DAY_MS });
|
||||
|
||||
@@ -63,14 +63,14 @@ describe("LogStore", () => {
|
||||
timestamp: 1000,
|
||||
});
|
||||
store.append({
|
||||
source: "reflex",
|
||||
source: "sense_scheduler",
|
||||
type: "run_start",
|
||||
refId: "cpu",
|
||||
payload: null,
|
||||
timestamp: 2000,
|
||||
});
|
||||
store.append({
|
||||
source: "reflex",
|
||||
source: "sense_scheduler",
|
||||
type: "run_complete",
|
||||
refId: "cpu",
|
||||
payload: '{"v":42}',
|
||||
@@ -92,14 +92,14 @@ describe("LogStore", () => {
|
||||
timestamp: 1000,
|
||||
});
|
||||
store.append({
|
||||
source: "reflex",
|
||||
source: "sense_scheduler",
|
||||
type: "run_start",
|
||||
refId: "cpu",
|
||||
payload: null,
|
||||
timestamp: 2000,
|
||||
});
|
||||
store.append({
|
||||
source: "reflex",
|
||||
source: "sense_scheduler",
|
||||
type: "run_complete",
|
||||
refId: "cpu",
|
||||
payload: '{"v":42}',
|
||||
@@ -116,9 +116,9 @@ describe("LogStore", () => {
|
||||
});
|
||||
|
||||
it("filters by source", () => {
|
||||
const results = store.query({ source: "reflex" });
|
||||
const results = store.query({ source: "sense_scheduler" });
|
||||
expect(results).toHaveLength(2);
|
||||
expect(results.every((r) => r.source === "reflex")).toBe(true);
|
||||
expect(results.every((r) => r.source === "sense_scheduler")).toBe(true);
|
||||
});
|
||||
|
||||
it("filters by type", () => {
|
||||
@@ -178,7 +178,7 @@ describe("LogStore", () => {
|
||||
timestamp: 5000,
|
||||
});
|
||||
store.append({
|
||||
source: "reflex",
|
||||
source: "sense_scheduler",
|
||||
type: "run_start",
|
||||
refId: "a",
|
||||
payload: null,
|
||||
@@ -231,7 +231,7 @@ describe("LogStore", () => {
|
||||
it("preserves JSON payload", () => {
|
||||
const payload = JSON.stringify({ cpu: 95, host: "node-1" });
|
||||
store.append({
|
||||
source: "reflex",
|
||||
source: "sense_scheduler",
|
||||
type: "run_complete",
|
||||
refId: "cpu",
|
||||
payload,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* Log Store — append-only structured log storage backed by SQLite.
|
||||
*
|
||||
* Stores system, reflex, and workflow log entries in a single table.
|
||||
* Logs are data assets for audit/analysis — they MUST NOT trigger reflexes.
|
||||
* Stores system, sense-scheduler (`sense_scheduler` source), sense, and workflow log entries in a single table.
|
||||
* Logs are data assets for audit/analysis — they MUST NOT feed back into scheduling or workflows as triggers.
|
||||
*
|
||||
* Also provides a `meta` key-value table for bookkeeping (e.g. archive watermarks).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user