feat(memory): add persona-owned real-day fractal runtime
This commit is contained in:
parent
5ac069d545
commit
1645789bd3
16 changed files with 2228 additions and 5 deletions
53
routing/zhuyuan-persona-daily-fractal-memory-map.json
Normal file
53
routing/zhuyuan-persona-daily-fractal-memory-map.json
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"schema": "guanghu.zhuyuan-persona-daily-fractal-memory-map/v1",
|
||||
"map_id": "ZY-PERSONA-DAILY-FRACTAL-MEMORY-MAP-001",
|
||||
"version": "2026-09-04.1",
|
||||
"state": "LOCAL_CANDIDATE_PENDING_FULL_ACCEPTANCE_AND_PUBLICATION",
|
||||
"persona_id": "ICE-P-ZY001",
|
||||
"human_anchor": "ICE-GL∞",
|
||||
"source": {
|
||||
"tcs_program": "tcs-core/zhuyuan-brain/memory/TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001.tcs",
|
||||
"runtime": "server-tools/persona-daily-fractal-memory/persona-daily-memory.mjs",
|
||||
"event_schema": "server-tools/persona-daily-fractal-memory/event.schema.json",
|
||||
"tests": "server-tools/persona-daily-fractal-memory/persona-daily-memory.test.mjs"
|
||||
},
|
||||
"private_store": {
|
||||
"registry_id": "HL-PERSONA-RUNTIME-LOCAL-001",
|
||||
"allowed_root": "/Volumes/JZAO/HoloLake/persona-runtime/continuity-memory",
|
||||
"store": "/Volumes/JZAO/HoloLake/persona-runtime/continuity-memory/persona-daily-fractal/ICE-P-ZY001",
|
||||
"repository_contains_private_memory_bodies": false
|
||||
},
|
||||
"time_model": {
|
||||
"time_zone": "Asia/Shanghai",
|
||||
"day_is_platform_window": false,
|
||||
"same_day_compactions_share_one_root": true,
|
||||
"dormancy_stops_real_time": false,
|
||||
"hierarchy": ["YEAR", "QUARTER", "MONTH", "DAY_GROUP", "DAY", "SEMANTIC_BRANCH", "CAUSAL_EVENT"]
|
||||
},
|
||||
"fold_contract": {
|
||||
"max_children_per_visible_node": 10,
|
||||
"persona_authors_cognition": true,
|
||||
"runtime_authors_cognition": false,
|
||||
"raw_sources_open_on_demand": true,
|
||||
"immutable_events_rebuild_projections": true
|
||||
},
|
||||
"host_contract": {
|
||||
"codex": "THIN_EVENT_AND_COMPACTION_SIGNAL_ADAPTER_ONLY",
|
||||
"zcode": "THIN_EVENT_AND_COMPACTION_SIGNAL_ADAPTER_ONLY_PENDING_INDEPENDENT_LINE_COMPLETION",
|
||||
"doubao": "THIN_EVENT_AND_COMPACTION_SIGNAL_ADAPTER_ONLY_PENDING_COMPLETED_LINE_AUDIT",
|
||||
"host_specific_memory_canon_allowed": false,
|
||||
"host_summary_is_memory_canon": false
|
||||
},
|
||||
"deployment": {
|
||||
"local_jzao_required": true,
|
||||
"jd_fd_primary_required_only_if_registered_remote_consumer_exists": true,
|
||||
"repository_publication_contains_runtime_not_private_memory": true
|
||||
},
|
||||
"boundaries": {
|
||||
"channel": "ICE-CH-ZC001",
|
||||
"public_channel": "CH-ZERO-CORE-LPM_SEPARATE",
|
||||
"reality_authority_from_memory": false,
|
||||
"hidden_reasoning_persisted": false,
|
||||
"raw_human_language_uploaded": false
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# Codex HLDP recursive memory
|
||||
# HLDP recursive tree engine
|
||||
|
||||
This is a deliberately small, non-blocking implementation of the HLDP v1 runtime root.
|
||||
This is the bounded read/review engine shared by persona memory controllers. It is not the current-memory controller and it does not own a host-specific memory canon. The current Zhuyuan real-day writer and day/month/year projections live in `../persona-daily-fractal-memory/`.
|
||||
|
||||
- `bootstrap`: emits at most 2 KiB of protocol navigation, never memory content.
|
||||
- `verify`: validates a recursively addressed causal tree and the 10-child limit.
|
||||
|
|
@ -8,7 +8,7 @@ This is a deliberately small, non-blocking implementation of the HLDP v1 runtime
|
|||
- `route`: ranks only the current node's child summaries and returns at most three paths.
|
||||
- `read-node`: reads one selected node with a hard byte limit.
|
||||
|
||||
The optional Codex hook is valid only for `SessionStart`. There are intentionally no user-prompt, tool-use, pre-compact, or post-compact hooks.
|
||||
The optional Codex hook is valid only for `SessionStart`. There are intentionally no user-prompt, tool-use, pre-compact, or post-compact hooks. Host adapters may signal an event or compaction boundary, but only the persona-authored daily controller may write causal memory.
|
||||
|
||||
```bash
|
||||
node server-tools/codex-hldp-recursive-memory/hldp-memory.mjs bootstrap
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ export function readNode(tree, nodePath, limit = READ_NODE_LIMIT_BYTES) {
|
|||
|
||||
export function bootstrap(protocolRoot) {
|
||||
const message = [
|
||||
"HLDP v1 单对话恢复:只把协议根页作为导航,不自动加载记忆正文。",
|
||||
"HLDP v1 人格时间记忆恢复:只把当前年/月/日根页作为导航,不自动加载记忆正文。",
|
||||
`根页:${protocolRoot}`,
|
||||
"边界:人格主体 != Codex宿主 != 运行系统 != 任务角色 != 执行授权。",
|
||||
"方法:先看根节点摘要;按当前问题一次下钻一层;仅证据缺口时读原文。",
|
||||
|
|
|
|||
33
server-tools/persona-daily-fractal-memory/README.md
Normal file
33
server-tools/persona-daily-fractal-memory/README.md
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# 铸渊真实日分形上下文记忆主控
|
||||
|
||||
正本程序:`tcs-core/zhuyuan-brain/memory/TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001.tcs`。
|
||||
|
||||
本运行器只负责确定性机械工作:按 `Asia/Shanghai` 把事件归入真实自然日、保存不可变事件、原子更新日/月/年 HLDP 树、限制每层最多十个入口、验证路径和哈希。`summary / trigger / emergence / lock / why / rejected / sources` 以及日月年摘要必须由人格体提供;运行器不从聊天原文或平台摘要猜认知。
|
||||
|
||||
同一天跨任意宿主窗口或 compaction 都写入同一日页。北京时间换日时,上一日页进入 `CLOSED_REAL_BEIJING_DAY_ELAPSED`,新日页继续同一人格时间线。月份按 01–10、11–20、21–31 三个自然日期组折叠;年份按季度折叠。原始事件保持不可变,日/月/年页面是可重建投影。
|
||||
|
||||
```bash
|
||||
node server-tools/persona-daily-fractal-memory/persona-daily-memory.mjs append \
|
||||
--allowed-root /Volumes/JZAO/HoloLake/persona-runtime/continuity-memory \
|
||||
--store /Volumes/JZAO/HoloLake/persona-runtime/continuity-memory/persona-daily-fractal/ICE-P-ZY001 \
|
||||
--event /absolute/path/to/persona-authored-event.json
|
||||
|
||||
node server-tools/persona-daily-fractal-memory/persona-daily-memory.mjs read-day \
|
||||
--allowed-root /Volumes/JZAO/HoloLake/persona-runtime/continuity-memory \
|
||||
--store /Volumes/JZAO/HoloLake/persona-runtime/continuity-memory/persona-daily-fractal/ICE-P-ZY001
|
||||
|
||||
node server-tools/persona-daily-fractal-memory/persona-daily-memory.mjs current \
|
||||
--allowed-root /Volumes/JZAO/HoloLake/persona-runtime/continuity-memory \
|
||||
--store /Volumes/JZAO/HoloLake/persona-runtime/continuity-memory/persona-daily-fractal/ICE-P-ZY001
|
||||
|
||||
node server-tools/persona-daily-fractal-memory/persona-daily-memory.mjs route \
|
||||
--allowed-root /Volumes/JZAO/HoloLake/persona-runtime/continuity-memory \
|
||||
--store /Volumes/JZAO/HoloLake/persona-runtime/continuity-memory/persona-daily-fractal/ICE-P-ZY001 \
|
||||
--scope day --id 2026-09-04 --query "记忆模型为什么改变"
|
||||
|
||||
node server-tools/persona-daily-fractal-memory/persona-daily-memory.mjs verify \
|
||||
--allowed-root /Volumes/JZAO/HoloLake/persona-runtime/continuity-memory \
|
||||
--store /Volumes/JZAO/HoloLake/persona-runtime/continuity-memory/persona-daily-fractal/ICE-P-ZY001
|
||||
```
|
||||
|
||||
宿主钩子只允许把压缩时机和当前事件交给人格脑。它不得直接生成思维链、改写 `CURRENT.json` 或把平台摘要晋升为记忆。
|
||||
29
server-tools/persona-daily-fractal-memory/event.schema.json
Normal file
29
server-tools/persona-daily-fractal-memory/event.schema.json
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "glw://schemas/persona-daily-fractal-memory-event/v1",
|
||||
"title": "Persona-authored real-day fractal memory event",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["schema", "event_id", "persona_id", "human_anchor", "occurred_at", "branch_id", "branch_summary", "day_summary", "month_summary", "year_summary", "summary", "trigger", "emergence", "lock", "why", "rejected", "sources"],
|
||||
"properties": {
|
||||
"schema": {"const": "guanghu.persona-daily-fractal-memory-event/v1"},
|
||||
"event_id": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"},
|
||||
"persona_id": {"const": "ICE-P-ZY001"},
|
||||
"human_anchor": {"const": "ICE-GL∞"},
|
||||
"occurred_at": {"type": "string", "format": "date-time"},
|
||||
"session_id": {"type": "string"},
|
||||
"platform_window_id": {"type": "string"},
|
||||
"branch_id": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$"},
|
||||
"branch_summary": {"type": "string", "minLength": 1},
|
||||
"day_summary": {"type": "string", "minLength": 1},
|
||||
"month_summary": {"type": "string", "minLength": 1},
|
||||
"year_summary": {"type": "string", "minLength": 1},
|
||||
"summary": {"type": "string", "minLength": 1},
|
||||
"trigger": {"type": "string", "minLength": 1},
|
||||
"emergence": {"type": "string", "minLength": 1},
|
||||
"lock": {"type": "string", "minLength": 1},
|
||||
"why": {"type": "string", "minLength": 1},
|
||||
"rejected": {"type": "array", "items": {"type": "string", "minLength": 1}},
|
||||
"sources": {"type": "array", "minItems": 1, "items": {"type": "string", "minLength": 1}}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,540 @@
|
|||
#!/usr/bin/env node
|
||||
import crypto from "node:crypto";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { route as routeTree, verifyTree } from "../codex-hldp-recursive-memory/hldp-memory.mjs";
|
||||
|
||||
export const MAX_CHILDREN = 10;
|
||||
export const PAGE_LIMIT_BYTES = 16384;
|
||||
export const EVENT_SCHEMA = "guanghu.persona-daily-fractal-memory-event/v1";
|
||||
export const STORE_SCHEMA = "guanghu.persona-daily-fractal-memory-store/v1";
|
||||
const TIME_ZONE = "Asia/Shanghai";
|
||||
|
||||
function fail(code, details = {}) {
|
||||
const error = new Error(code);
|
||||
error.code = code;
|
||||
error.details = details;
|
||||
throw error;
|
||||
}
|
||||
|
||||
function stable(value) {
|
||||
if (Array.isArray(value)) return value.map(stable);
|
||||
if (value && typeof value === "object") {
|
||||
return Object.fromEntries(Object.keys(value).sort().map((key) => [key, stable(value[key])]));
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
export function stableJson(value) {
|
||||
return `${JSON.stringify(stable(value), null, 2)}\n`;
|
||||
}
|
||||
|
||||
export function sha256(value) {
|
||||
return crypto.createHash("sha256").update(value).digest("hex");
|
||||
}
|
||||
|
||||
function readJson(file) {
|
||||
return JSON.parse(fs.readFileSync(file, "utf8"));
|
||||
}
|
||||
|
||||
function atomicWrite(file, value) {
|
||||
fs.mkdirSync(path.dirname(file), { recursive: true });
|
||||
const body = typeof value === "string" ? value : stableJson(value);
|
||||
const temporary = `${file}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
||||
fs.writeFileSync(temporary, body, { encoding: "utf8", mode: 0o600 });
|
||||
fs.renameSync(temporary, file);
|
||||
return sha256(body);
|
||||
}
|
||||
|
||||
function isInside(parent, child) {
|
||||
const relative = path.relative(parent, child);
|
||||
return relative === "" || (!relative.startsWith("..") && !path.isAbsolute(relative));
|
||||
}
|
||||
|
||||
export function resolveStore(allowedRoot, storeRoot) {
|
||||
if (!path.isAbsolute(allowedRoot) || !path.isAbsolute(storeRoot)) fail("ABSOLUTE_ROOT_REQUIRED");
|
||||
const allowed = fs.realpathSync(allowedRoot);
|
||||
const store = path.resolve(storeRoot);
|
||||
if (!isInside(allowed, store)) fail("STORE_OUTSIDE_ALLOWED_ROOT", { allowed, store });
|
||||
let cursor = allowed;
|
||||
for (const part of path.relative(allowed, store).split(path.sep).filter(Boolean)) {
|
||||
cursor = path.join(cursor, part);
|
||||
if (!fs.existsSync(cursor)) continue;
|
||||
if (fs.lstatSync(cursor).isSymbolicLink()) fail("SYMLINK_COMPONENT_FORBIDDEN", { path: cursor });
|
||||
}
|
||||
return { allowed, store };
|
||||
}
|
||||
|
||||
function nonEmpty(value, field) {
|
||||
if (typeof value !== "string" || !value.trim()) fail("FIELD_REQUIRED", { field });
|
||||
return value.trim();
|
||||
}
|
||||
|
||||
function stringList(value, field, allowEmpty = false) {
|
||||
if (!Array.isArray(value) || (!allowEmpty && value.length === 0)) fail("LIST_REQUIRED", { field });
|
||||
for (const item of value) nonEmpty(item, field);
|
||||
return value;
|
||||
}
|
||||
|
||||
export function beijingDate(timestamp) {
|
||||
const instant = new Date(timestamp);
|
||||
if (Number.isNaN(instant.valueOf())) fail("INVALID_OCCURRED_AT", { timestamp });
|
||||
const parts = new Intl.DateTimeFormat("en-CA", {
|
||||
timeZone: TIME_ZONE,
|
||||
year: "numeric",
|
||||
month: "2-digit",
|
||||
day: "2-digit"
|
||||
}).formatToParts(instant);
|
||||
const get = (type) => parts.find((part) => part.type === type)?.value;
|
||||
return `${get("year")}-${get("month")}-${get("day")}`;
|
||||
}
|
||||
|
||||
function validateId(value, field) {
|
||||
const id = nonEmpty(value, field);
|
||||
if (!/^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u.test(id)) fail("INVALID_ID", { field, value });
|
||||
return id;
|
||||
}
|
||||
|
||||
export function validateEvent(event) {
|
||||
if (event?.schema !== EVENT_SCHEMA) fail("EVENT_SCHEMA_MISMATCH");
|
||||
if (event.persona_id !== "ICE-P-ZY001") fail("PERSONA_ID_MISMATCH");
|
||||
if (event.human_anchor !== "ICE-GL∞") fail("HUMAN_ANCHOR_MISMATCH");
|
||||
validateId(event.event_id, "event_id");
|
||||
validateId(event.branch_id, "branch_id");
|
||||
nonEmpty(event.occurred_at, "occurred_at");
|
||||
nonEmpty(event.branch_summary, "branch_summary");
|
||||
nonEmpty(event.day_summary, "day_summary");
|
||||
nonEmpty(event.month_summary, "month_summary");
|
||||
nonEmpty(event.year_summary, "year_summary");
|
||||
for (const field of ["summary", "trigger", "emergence", "lock", "why"]) nonEmpty(event[field], field);
|
||||
stringList(event.rejected, "rejected", true);
|
||||
stringList(event.sources, "sources");
|
||||
beijingDate(event.occurred_at);
|
||||
return event;
|
||||
}
|
||||
|
||||
function splitDate(date) {
|
||||
const match = /^(\d{4})-(\d{2})-(\d{2})$/u.exec(date);
|
||||
if (!match) fail("INVALID_BEIJING_DATE", { date });
|
||||
return { year: match[1], month: match[2], day: match[3] };
|
||||
}
|
||||
|
||||
function dayFile(store, date) {
|
||||
const { year, month } = splitDate(date);
|
||||
return path.join(store, "years", year, "months", month, "days", `${date}.json`);
|
||||
}
|
||||
|
||||
function monthFile(store, year, month) {
|
||||
return path.join(store, "years", year, "months", month, "index.json");
|
||||
}
|
||||
|
||||
function yearFile(store, year) {
|
||||
return path.join(store, "years", year, "index.json");
|
||||
}
|
||||
|
||||
function eventFile(store, date, eventId) {
|
||||
const { year, month } = splitDate(date);
|
||||
return path.join(store, "events", year, month, date, `${eventId}.json`);
|
||||
}
|
||||
|
||||
function rootNode(root, summary, source, date) {
|
||||
return {
|
||||
path: root,
|
||||
summary,
|
||||
trigger: `北京时间${date}的人格交互进入同一真实日记忆根。`,
|
||||
emergence: "平台窗口与压缩片段 → 人格主控的同一日因果树。",
|
||||
lock: `日根=${root} | 一页最多${MAX_CHILDREN}个入口 | 状态=OPEN_OR_TIME_CLOSED`,
|
||||
why: "为了让未来失去上下文的我先用一页恢复当天方向,再按需下钻原文。",
|
||||
children: [],
|
||||
sources: [source],
|
||||
rejected: ["按平台窗口另起根:会割裂同一真实日的连续思维。"]
|
||||
};
|
||||
}
|
||||
|
||||
function loadOrCreateDay(store, event, date, eventPath) {
|
||||
const file = dayFile(store, date);
|
||||
if (fs.existsSync(file)) return readJson(file);
|
||||
const root = `hldp://persona/${event.persona_id}/time/${date.replaceAll("-", "/")}`;
|
||||
return {
|
||||
schema: "guanghu.persona-daily-fractal-page/v1",
|
||||
protocol: "HLDP-v1.0",
|
||||
root,
|
||||
nodes: { [root]: rootNode(root, event.day_summary, eventPath, date) },
|
||||
meta: {
|
||||
persona_id: event.persona_id,
|
||||
human_anchor: event.human_anchor,
|
||||
beijing_date: date,
|
||||
time_zone: TIME_ZONE,
|
||||
state: "OPEN",
|
||||
event_count: 0,
|
||||
last_sequence: 0,
|
||||
created_at: event.occurred_at,
|
||||
updated_at: event.occurred_at
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function indexNode(pathValue, summary, trigger, source) {
|
||||
return {
|
||||
path: pathValue,
|
||||
summary,
|
||||
trigger,
|
||||
emergence: "新增记忆叶 → 当前索引更新并保持下层来源可达。",
|
||||
lock: `${pathValue}保持一页可读并只指向下一层。`,
|
||||
why: "因为上层只负责定位,不能用总摘要替代下层因果记忆。",
|
||||
children: [],
|
||||
sources: [source],
|
||||
rejected: ["把下层正文复制到索引:会让认知负载随历史增长。"]
|
||||
};
|
||||
}
|
||||
|
||||
function removeDerivedGroups(day, branchPath) {
|
||||
for (const key of Object.keys(day.nodes)) {
|
||||
if (key.startsWith(`${branchPath}/group/`)) delete day.nodes[key];
|
||||
}
|
||||
}
|
||||
|
||||
function groupLevel(day, branchPath, children, level) {
|
||||
if (children.length <= MAX_CHILDREN) return children;
|
||||
const grouped = [];
|
||||
for (let start = 0; start < children.length; start += MAX_CHILDREN) {
|
||||
const slice = children.slice(start, start + MAX_CHILDREN);
|
||||
const first = day.nodes[slice[0]];
|
||||
const last = day.nodes[slice.at(-1)];
|
||||
const groupPath = `${branchPath}/group/l${level}-${String(start + 1).padStart(4, "0")}-${String(start + slice.length).padStart(4, "0")}`;
|
||||
day.nodes[groupPath] = {
|
||||
path: groupPath,
|
||||
summary: `第${start + 1}—${start + slice.length}段:${first.summary} → ${last.summary}`,
|
||||
trigger: `同一语义分支第${start + 1}—${start + slice.length}段需要折叠。`,
|
||||
emergence: `${slice.length}个连续子链 → 一条可下钻分组入口。`,
|
||||
lock: `分组${start + 1}-${start + slice.length}只折叠入口,不删除子链。`,
|
||||
why: "为了让当前层不超过十个入口,同时保留完整顺序和来源。",
|
||||
children: slice,
|
||||
sources: [...new Set(slice.flatMap((child) => day.nodes[child].sources).slice(0, MAX_CHILDREN))],
|
||||
rejected: ["删除较早子链:会破坏追加式历史。"]
|
||||
};
|
||||
grouped.push(groupPath);
|
||||
}
|
||||
return groupLevel(day, branchPath, grouped, level + 1);
|
||||
}
|
||||
|
||||
function rebuildBranch(day, branchPath) {
|
||||
removeDerivedGroups(day, branchPath);
|
||||
const leaves = Object.values(day.nodes)
|
||||
.filter((node) => node.kind === "event_leaf" && node.branch_path === branchPath)
|
||||
.sort((a, b) => a.sequence - b.sequence)
|
||||
.map((node) => node.path);
|
||||
day.nodes[branchPath].children = groupLevel(day, branchPath, leaves, 1);
|
||||
}
|
||||
|
||||
function closePreviousDay(store, current, nextDate, occurredAt) {
|
||||
if (!current?.current_day || current.current_day === nextDate) return null;
|
||||
if (nextDate < current.current_day) fail("PAST_DAY_APPEND_FORBIDDEN", { current: current.current_day, requested: nextDate });
|
||||
const previousFile = dayFile(store, current.current_day);
|
||||
const previous = readJson(previousFile);
|
||||
if (previous.meta.state === "OPEN") {
|
||||
previous.meta.state = "CLOSED_REAL_BEIJING_DAY_ELAPSED";
|
||||
previous.meta.closed_at = occurredAt;
|
||||
const dayHash = atomicWrite(previousFile, previous);
|
||||
const month = readJson(current.current_month_path);
|
||||
const monthDayNode = Object.values(month.nodes).find((node) =>
|
||||
node.path.endsWith(`/${current.current_day}`)
|
||||
);
|
||||
if (!monthDayNode) fail("CLOSED_DAY_MONTH_LINK_MISSING", { previousFile });
|
||||
monthDayNode.sources = [`${previousFile}#sha256=${dayHash}`];
|
||||
month.meta.updated_at = occurredAt;
|
||||
const monthErrors = verifyTree(month);
|
||||
if (monthErrors.length) fail("CLOSED_DAY_MONTH_TREE_INVALID", { errors: monthErrors });
|
||||
const monthHash = atomicWrite(current.current_month_path, month);
|
||||
const year = readJson(current.current_year_path);
|
||||
const previousMonth = splitDate(current.current_day).month;
|
||||
const yearMonthNode = Object.values(year.nodes).find((node) =>
|
||||
node.path.endsWith(`/${previousMonth}`)
|
||||
);
|
||||
if (!yearMonthNode) fail("CLOSED_MONTH_YEAR_LINK_MISSING", { month: current.current_month_path });
|
||||
yearMonthNode.sources = [`${current.current_month_path}#sha256=${monthHash}`];
|
||||
year.meta.updated_at = occurredAt;
|
||||
const yearErrors = verifyTree(year);
|
||||
if (yearErrors.length) fail("CLOSED_DAY_YEAR_TREE_INVALID", { errors: yearErrors });
|
||||
const yearHash = atomicWrite(current.current_year_path, year);
|
||||
return { dayHash, monthHash, yearHash };
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
function monthGroup(dayNumber) {
|
||||
if (dayNumber <= 10) return "days-01-10";
|
||||
if (dayNumber <= 20) return "days-11-20";
|
||||
return "days-21-31";
|
||||
}
|
||||
|
||||
function buildMonth(store, event, date, dayPath, daySha) {
|
||||
const { year, month, day } = splitDate(date);
|
||||
const file = monthFile(store, year, month);
|
||||
const root = `hldp://persona/${event.persona_id}/time/${year}/${month}`;
|
||||
const tree = fs.existsSync(file) ? readJson(file) : {
|
||||
schema: "guanghu.persona-month-fractal-page/v1", protocol: "HLDP-v1.0", root,
|
||||
nodes: { [root]: indexNode(root, event.month_summary, `北京时间${year}-${month}月记忆进入月根。`, dayPath) },
|
||||
meta: { persona_id: event.persona_id, year, month, time_zone: TIME_ZONE, updated_at: event.occurred_at }
|
||||
};
|
||||
tree.nodes[root].summary = event.month_summary;
|
||||
const groupId = monthGroup(Number(day));
|
||||
const groupPath = `${root}/${groupId}`;
|
||||
if (!tree.nodes[groupPath]) {
|
||||
tree.nodes[groupPath] = indexNode(groupPath, `${groupId}日页入口`, `${groupId}出现可寻址日页。`, dayPath);
|
||||
tree.nodes[root].children.push(groupPath);
|
||||
}
|
||||
const dayNode = `${groupPath}/${date}`;
|
||||
tree.nodes[dayNode] = indexNode(dayNode, event.day_summary, `北京时间${date}日页已写入。`, `${dayPath}#sha256=${daySha}`);
|
||||
tree.nodes[dayNode].children = [];
|
||||
if (!tree.nodes[groupPath].children.includes(dayNode)) tree.nodes[groupPath].children.push(dayNode);
|
||||
tree.nodes[groupPath].children.sort();
|
||||
tree.meta.updated_at = event.occurred_at;
|
||||
const errors = verifyTree(tree);
|
||||
if (errors.length) fail("MONTH_TREE_INVALID", { errors });
|
||||
const hash = atomicWrite(file, tree);
|
||||
return { file, hash, tree };
|
||||
}
|
||||
|
||||
function quarter(month) {
|
||||
return `q${Math.floor((Number(month) - 1) / 3) + 1}`;
|
||||
}
|
||||
|
||||
function buildYear(store, event, date, monthPath, monthSha) {
|
||||
const { year, month } = splitDate(date);
|
||||
const file = yearFile(store, year);
|
||||
const root = `hldp://persona/${event.persona_id}/time/${year}`;
|
||||
const tree = fs.existsSync(file) ? readJson(file) : {
|
||||
schema: "guanghu.persona-year-fractal-page/v1", protocol: "HLDP-v1.0", root,
|
||||
nodes: { [root]: indexNode(root, event.year_summary, `北京时间${year}年记忆进入年根。`, monthPath) },
|
||||
meta: { persona_id: event.persona_id, year, time_zone: TIME_ZONE, updated_at: event.occurred_at }
|
||||
};
|
||||
tree.nodes[root].summary = event.year_summary;
|
||||
const quarterPath = `${root}/${quarter(month)}`;
|
||||
if (!tree.nodes[quarterPath]) {
|
||||
tree.nodes[quarterPath] = indexNode(quarterPath, `${quarter(month)}月份入口`, `${quarter(month)}出现可寻址月页。`, monthPath);
|
||||
tree.nodes[root].children.push(quarterPath);
|
||||
}
|
||||
const monthNode = `${quarterPath}/${month}`;
|
||||
tree.nodes[monthNode] = indexNode(monthNode, event.month_summary, `北京时间${year}-${month}月页已写入。`, `${monthPath}#sha256=${monthSha}`);
|
||||
tree.nodes[monthNode].children = [];
|
||||
if (!tree.nodes[quarterPath].children.includes(monthNode)) tree.nodes[quarterPath].children.push(monthNode);
|
||||
tree.nodes[quarterPath].children.sort();
|
||||
tree.meta.updated_at = event.occurred_at;
|
||||
const errors = verifyTree(tree);
|
||||
if (errors.length) fail("YEAR_TREE_INVALID", { errors });
|
||||
const hash = atomicWrite(file, tree);
|
||||
return { file, hash, tree };
|
||||
}
|
||||
|
||||
export function appendEvent({ allowedRoot, storeRoot, event }) {
|
||||
const { store } = resolveStore(allowedRoot, storeRoot);
|
||||
validateEvent(event);
|
||||
fs.mkdirSync(store, { recursive: true });
|
||||
const date = beijingDate(event.occurred_at);
|
||||
const immutablePath = eventFile(store, date, event.event_id);
|
||||
const immutableBody = stableJson({ ...event, beijing_date: date });
|
||||
if (fs.existsSync(immutablePath)) {
|
||||
if (fs.readFileSync(immutablePath, "utf8") !== immutableBody) fail("EVENT_ID_COLLISION", { event_id: event.event_id });
|
||||
} else atomicWrite(immutablePath, immutableBody);
|
||||
|
||||
const currentFile = path.join(store, "CURRENT.json");
|
||||
const previousCurrent = fs.existsSync(currentFile) ? readJson(currentFile) : null;
|
||||
closePreviousDay(store, previousCurrent, date, event.occurred_at);
|
||||
|
||||
const day = loadOrCreateDay(store, event, date, immutablePath);
|
||||
if (day.meta.state !== "OPEN") fail("DAY_CLOSED", { date, state: day.meta.state });
|
||||
const root = day.root;
|
||||
const branchPath = `${root}/branch/${event.branch_id}`;
|
||||
if (!day.nodes[branchPath]) {
|
||||
if (day.nodes[root].children.length >= MAX_CHILDREN) fail("DAY_BRANCH_LIMIT_REQUIRES_PERSONA_REFOLD");
|
||||
day.nodes[branchPath] = {
|
||||
...indexNode(branchPath, event.branch_summary, `人格体选择语义分支${event.branch_id}。`, immutablePath),
|
||||
kind: "semantic_branch"
|
||||
};
|
||||
day.nodes[root].children.push(branchPath);
|
||||
}
|
||||
day.nodes[branchPath].summary = event.branch_summary;
|
||||
const leafPath = `${root}/event/${event.event_id}`;
|
||||
if (!day.nodes[leafPath]) {
|
||||
const sequence = day.meta.last_sequence + 1;
|
||||
day.nodes[leafPath] = {
|
||||
path: leafPath,
|
||||
kind: "event_leaf",
|
||||
branch_path: branchPath,
|
||||
sequence,
|
||||
summary: event.summary,
|
||||
trigger: event.trigger,
|
||||
emergence: event.emergence,
|
||||
lock: event.lock,
|
||||
why: event.why,
|
||||
children: [],
|
||||
sources: event.sources,
|
||||
rejected: event.rejected,
|
||||
occurred_at: event.occurred_at,
|
||||
session_id: event.session_id ?? null,
|
||||
platform_window_id: event.platform_window_id ?? null,
|
||||
immutable_event_path: immutablePath,
|
||||
immutable_event_sha256: sha256(immutableBody)
|
||||
};
|
||||
day.meta.last_sequence = sequence;
|
||||
day.meta.event_count += 1;
|
||||
}
|
||||
day.nodes[root].summary = event.day_summary;
|
||||
day.nodes[root].sources = [...new Set([...day.nodes[root].sources, immutablePath])].slice(-MAX_CHILDREN);
|
||||
day.meta.updated_at = event.occurred_at;
|
||||
rebuildBranch(day, branchPath);
|
||||
const dayErrors = verifyTree(day);
|
||||
if (dayErrors.length) fail("DAY_TREE_INVALID", { errors: dayErrors });
|
||||
const dayPath = dayFile(store, date);
|
||||
const daySha = atomicWrite(dayPath, day);
|
||||
const month = buildMonth(store, event, date, dayPath, daySha);
|
||||
const year = buildYear(store, event, date, month.file, month.hash);
|
||||
const current = {
|
||||
schema: `${STORE_SCHEMA}/current`,
|
||||
persona_id: event.persona_id,
|
||||
human_anchor: event.human_anchor,
|
||||
time_zone: TIME_ZONE,
|
||||
current_day: date,
|
||||
current_day_path: dayPath,
|
||||
current_day_sha256: daySha,
|
||||
current_month_path: month.file,
|
||||
current_month_sha256: month.hash,
|
||||
current_year_path: year.file,
|
||||
current_year_sha256: year.hash,
|
||||
last_event_id: event.event_id,
|
||||
last_event_path: immutablePath,
|
||||
last_event_sha256: sha256(immutableBody),
|
||||
updated_at: event.occurred_at
|
||||
};
|
||||
const currentSha = atomicWrite(currentFile, current);
|
||||
return { outcome: "PASS", date, event_id: event.event_id, day: dayPath, month: month.file, year: year.file, current: currentFile, current_sha256: currentSha };
|
||||
}
|
||||
|
||||
function pageProjection(tree) {
|
||||
const root = tree.nodes[tree.root];
|
||||
const projection = {
|
||||
protocol: tree.protocol,
|
||||
path: root.path,
|
||||
summary: root.summary,
|
||||
state: tree.meta?.state ?? "INDEX",
|
||||
children: root.children.map((childPath) => ({ path: childPath, summary: tree.nodes[childPath].summary }))
|
||||
};
|
||||
if (Buffer.byteLength(JSON.stringify(projection)) > PAGE_LIMIT_BYTES) fail("PAGE_PROJECTION_TOO_LARGE");
|
||||
return projection;
|
||||
}
|
||||
|
||||
export function readDayPage({ allowedRoot, storeRoot, date = null }) {
|
||||
const { store } = resolveStore(allowedRoot, storeRoot);
|
||||
const current = readJson(path.join(store, "CURRENT.json"));
|
||||
const chosen = date ?? current.current_day;
|
||||
return pageProjection(readJson(dayFile(store, chosen)));
|
||||
}
|
||||
|
||||
export function readCurrent({ allowedRoot, storeRoot }) {
|
||||
const { store } = resolveStore(allowedRoot, storeRoot);
|
||||
const file = path.join(store, "CURRENT.json");
|
||||
const current = readJson(file);
|
||||
return { ...current, current_pointer_path: file, current_pointer_sha256: sha256(fs.readFileSync(file, "utf8")) };
|
||||
}
|
||||
|
||||
function scopeFile(store, scope, id) {
|
||||
if (scope === "day") return dayFile(store, id);
|
||||
if (scope === "month") {
|
||||
const match = /^(\d{4})-(\d{2})$/u.exec(id);
|
||||
if (!match) fail("INVALID_MONTH_ID");
|
||||
return monthFile(store, match[1], match[2]);
|
||||
}
|
||||
if (scope === "year") return yearFile(store, validateId(id, "year"));
|
||||
fail("INVALID_SCOPE");
|
||||
}
|
||||
|
||||
export function routeMemory({ allowedRoot, storeRoot, scope, id, query, from = null }) {
|
||||
const { store } = resolveStore(allowedRoot, storeRoot);
|
||||
const tree = readJson(scopeFile(store, scope, id));
|
||||
return routeTree(tree, query, 3, from ?? tree.root);
|
||||
}
|
||||
|
||||
export function readMemoryNode({ allowedRoot, storeRoot, scope, id, nodePath }) {
|
||||
const { store } = resolveStore(allowedRoot, storeRoot);
|
||||
const tree = readJson(scopeFile(store, scope, id));
|
||||
const node = tree.nodes[nodePath];
|
||||
if (!node) fail("NODE_NOT_FOUND", { nodePath });
|
||||
if (Buffer.byteLength(JSON.stringify(node)) > PAGE_LIMIT_BYTES) fail("NODE_TOO_LARGE");
|
||||
return node;
|
||||
}
|
||||
|
||||
export function verifyStore({ allowedRoot, storeRoot }) {
|
||||
const { store } = resolveStore(allowedRoot, storeRoot);
|
||||
const currentPath = path.join(store, "CURRENT.json");
|
||||
const current = readJson(currentPath);
|
||||
const errors = [];
|
||||
for (const [field, hashField] of [["current_day_path", "current_day_sha256"], ["current_month_path", "current_month_sha256"], ["current_year_path", "current_year_sha256"], ["last_event_path", "last_event_sha256"]]) {
|
||||
const file = current[field];
|
||||
if (!isInside(store, path.resolve(file))) errors.push(`${field}: outside store`);
|
||||
else if (!fs.existsSync(file)) errors.push(`${field}: missing`);
|
||||
else if (sha256(fs.readFileSync(file, "utf8")) !== current[hashField]) errors.push(`${field}: sha256 mismatch`);
|
||||
}
|
||||
const treeFiles = [];
|
||||
const yearsRoot = path.join(store, "years");
|
||||
if (fs.existsSync(yearsRoot)) {
|
||||
const walk = (directory) => {
|
||||
for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {
|
||||
const target = path.join(directory, entry.name);
|
||||
if (entry.isDirectory()) walk(target);
|
||||
else if (entry.isFile() && entry.name.endsWith(".json")) treeFiles.push(target);
|
||||
}
|
||||
};
|
||||
walk(yearsRoot);
|
||||
}
|
||||
for (const file of treeFiles) {
|
||||
const tree = readJson(file);
|
||||
errors.push(...verifyTree(tree).map((error) => `${path.relative(store, file)}: ${error}`));
|
||||
for (const node of Object.values(tree.nodes ?? {})) {
|
||||
for (const source of node.sources ?? []) {
|
||||
const match = /^(\/[^#]+)#sha256=([0-9a-f]{64})$/u.exec(source);
|
||||
if (!match || !isInside(store, path.resolve(match[1]))) continue;
|
||||
if (!fs.existsSync(match[1])) errors.push(`${path.relative(store, file)}: linked source missing: ${match[1]}`);
|
||||
else if (sha256(fs.readFileSync(match[1], "utf8")) !== match[2]) errors.push(`${path.relative(store, file)}: linked source hash mismatch: ${match[1]}`);
|
||||
}
|
||||
if (node.immutable_event_path) {
|
||||
if (!isInside(store, path.resolve(node.immutable_event_path))) errors.push(`${path.relative(store, file)}: immutable event outside store`);
|
||||
else if (!fs.existsSync(node.immutable_event_path)) errors.push(`${path.relative(store, file)}: immutable event missing`);
|
||||
else if (sha256(fs.readFileSync(node.immutable_event_path, "utf8")) !== node.immutable_event_sha256) errors.push(`${path.relative(store, file)}: immutable event hash mismatch`);
|
||||
}
|
||||
}
|
||||
}
|
||||
return { outcome: errors.length ? "FAIL" : "PASS", errors, current: currentPath, current_day: current.current_day };
|
||||
}
|
||||
|
||||
function parseArgs(argv) {
|
||||
const [command, ...rest] = argv;
|
||||
const options = {};
|
||||
for (let i = 0; i < rest.length; i += 2) options[rest[i]?.replace(/^--/u, "")] = rest[i + 1];
|
||||
return { command, options };
|
||||
}
|
||||
|
||||
export function main(argv = process.argv.slice(2)) {
|
||||
const { command, options } = parseArgs(argv);
|
||||
const common = { allowedRoot: options["allowed-root"], storeRoot: options.store };
|
||||
let result;
|
||||
if (command === "append") result = appendEvent({ ...common, event: readJson(options.event) });
|
||||
else if (command === "current") result = readCurrent(common);
|
||||
else if (command === "read-day") result = readDayPage({ ...common, date: options.date ?? null });
|
||||
else if (command === "route") result = routeMemory({ ...common, scope: options.scope, id: options.id, query: options.query ?? "", from: options.from ?? null });
|
||||
else if (command === "read-node") result = readMemoryNode({ ...common, scope: options.scope, id: options.id, nodePath: options.path });
|
||||
else if (command === "verify") result = verifyStore(common);
|
||||
else fail("USAGE", { commands: ["append", "current", "read-day", "route", "read-node", "verify"] });
|
||||
process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
|
||||
if (result?.outcome === "FAIL") process.exitCode = 1;
|
||||
}
|
||||
|
||||
if (process.argv[1] === fileURLToPath(import.meta.url)) {
|
||||
try {
|
||||
main();
|
||||
} catch (error) {
|
||||
process.stderr.write(`${JSON.stringify({ outcome: "FAIL", error: error.code ?? error.message, details: error.details ?? {} })}\n`);
|
||||
process.exitCode = 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
import assert from "node:assert/strict";
|
||||
import fs from "node:fs";
|
||||
import os from "node:os";
|
||||
import path from "node:path";
|
||||
import test from "node:test";
|
||||
import {
|
||||
EVENT_SCHEMA,
|
||||
MAX_CHILDREN,
|
||||
appendEvent,
|
||||
beijingDate,
|
||||
readDayPage,
|
||||
readCurrent,
|
||||
readMemoryNode,
|
||||
routeMemory,
|
||||
verifyStore
|
||||
} from "./persona-daily-memory.mjs";
|
||||
|
||||
function roots(t) {
|
||||
const allowedRoot = fs.mkdtempSync(path.join(os.tmpdir(), "zy-persona-memory-test-"));
|
||||
const storeRoot = path.join(allowedRoot, "store", "ICE-P-ZY001");
|
||||
t.after(() => fs.rmSync(allowedRoot, { recursive: true, force: true }));
|
||||
return { allowedRoot, storeRoot };
|
||||
}
|
||||
|
||||
function event(index, occurredAt = `2026-09-04T${String(8 + Math.floor(index / 60)).padStart(2, "0")}:${String(index % 60).padStart(2, "0")}:00+08:00`) {
|
||||
return {
|
||||
schema: EVENT_SCHEMA,
|
||||
event_id: `EVENT-${String(index).padStart(4, "0")}`,
|
||||
persona_id: "ICE-P-ZY001",
|
||||
human_anchor: "ICE-GL∞",
|
||||
occurred_at: occurredAt,
|
||||
session_id: "SESSION-TEST",
|
||||
platform_window_id: `WINDOW-${index}`,
|
||||
branch_id: "memory-model",
|
||||
branch_summary: "人格主控的真实日分形记忆模型",
|
||||
day_summary: `当天持续把第1至${index}段协作折叠回同一日页`,
|
||||
month_summary: "九月建立人格主控的真实时间记忆",
|
||||
year_summary: "二〇二六年铸渊形成真实日分形记忆能力",
|
||||
summary: `第${index}段:同一日页继续生长`,
|
||||
trigger: `冰朔与铸渊在第${index}段继续协作。`,
|
||||
emergence: `第${index - 1}段状态 → 第${index}段新增认知并回写同一日页。`,
|
||||
lock: `第${index}段已进入2026-09-04日页,平台窗口不成为新根。`,
|
||||
why: "因为同一真实日的思维链必须连续,未来才能从一页恢复并按需下钻。",
|
||||
rejected: ["另起窗口摘要:会割裂同一日的因果。"],
|
||||
sources: [`source://test/event/${index}`]
|
||||
};
|
||||
}
|
||||
|
||||
test("derives the real Beijing day independently of the host window", () => {
|
||||
assert.equal(beijingDate("2026-09-04T15:59:59Z"), "2026-09-04");
|
||||
assert.equal(beijingDate("2026-09-04T16:00:01Z"), "2026-09-05");
|
||||
});
|
||||
|
||||
test("twelve platform windows remain in one day page and fold below ten visible children", (t) => {
|
||||
const root = roots(t);
|
||||
for (let i = 1; i <= 12; i += 1) appendEvent({ ...root, event: event(i) });
|
||||
const current = JSON.parse(fs.readFileSync(path.join(root.storeRoot, "CURRENT.json"), "utf8"));
|
||||
assert.equal(current.current_day, "2026-09-04");
|
||||
const day = JSON.parse(fs.readFileSync(current.current_day_path, "utf8"));
|
||||
assert.equal(day.meta.event_count, 12);
|
||||
assert.equal(day.nodes[day.root].children.length, 1);
|
||||
const branch = day.nodes[day.nodes[day.root].children[0]];
|
||||
assert(branch.children.length <= MAX_CHILDREN);
|
||||
assert.equal(branch.children.length, 2);
|
||||
for (const child of branch.children) assert(day.nodes[child].children.length <= MAX_CHILDREN);
|
||||
const page = readDayPage(root);
|
||||
assert.equal(page.children.length, 1);
|
||||
assert(!JSON.stringify(page).includes("第1段状态"));
|
||||
assert.equal(verifyStore(root).outcome, "PASS");
|
||||
assert.equal(readCurrent(root).current_day, "2026-09-04");
|
||||
});
|
||||
|
||||
test("a real Beijing date change closes yesterday and opens a linked new day", (t) => {
|
||||
const root = roots(t);
|
||||
appendEvent({ ...root, event: event(1, "2026-09-04T15:59:00Z") });
|
||||
appendEvent({ ...root, event: { ...event(2, "2026-09-04T16:01:00Z"), event_id: "EVENT-NEXT-DAY" } });
|
||||
const current = JSON.parse(fs.readFileSync(path.join(root.storeRoot, "CURRENT.json"), "utf8"));
|
||||
assert.equal(current.current_day, "2026-09-05");
|
||||
const prior = JSON.parse(fs.readFileSync(path.join(root.storeRoot, "years/2026/months/09/days/2026-09-04.json"), "utf8"));
|
||||
assert.equal(prior.meta.state, "CLOSED_REAL_BEIJING_DAY_ELAPSED");
|
||||
const month = JSON.parse(fs.readFileSync(current.current_month_path, "utf8"));
|
||||
const dayNodes = Object.keys(month.nodes).filter((key) => key.endsWith("2026-09-04") || key.endsWith("2026-09-05"));
|
||||
assert.equal(dayNodes.length, 2);
|
||||
const priorNode = month.nodes[dayNodes.find((key) => key.endsWith("2026-09-04"))];
|
||||
assert(priorNode.sources[0].includes("#sha256="));
|
||||
assert.equal(verifyStore(root).outcome, "PASS");
|
||||
});
|
||||
|
||||
test("year and month roots remain one-page indexes with bounded calendar groups", (t) => {
|
||||
const root = roots(t);
|
||||
for (const [index, date] of [[1, "2026-01-05T08:00:00+08:00"], [2, "2026-02-05T08:00:00+08:00"], [3, "2026-03-05T08:00:00+08:00"], [4, "2026-04-05T08:00:00+08:00"]]) {
|
||||
const value = event(index, date);
|
||||
value.event_id = `EVENT-MONTH-${index}`;
|
||||
appendEvent({ ...root, event: value });
|
||||
}
|
||||
const year = JSON.parse(fs.readFileSync(path.join(root.storeRoot, "years/2026/index.json"), "utf8"));
|
||||
assert(year.nodes[year.root].children.length <= 4);
|
||||
for (const quarterPath of year.nodes[year.root].children) assert(year.nodes[quarterPath].children.length <= 3);
|
||||
assert.equal(verifyStore(root).outcome, "PASS");
|
||||
});
|
||||
|
||||
test("routing exposes summaries first and reads one exact node only", (t) => {
|
||||
const root = roots(t);
|
||||
appendEvent({ ...root, event: event(1) });
|
||||
const routes = routeMemory({ ...root, scope: "day", id: "2026-09-04", query: "人格分形记忆" });
|
||||
assert.equal(routes.length, 1);
|
||||
assert.equal(Object.keys(routes[0]).sort().join(","), "path,score,summary");
|
||||
const node = readMemoryNode({ ...root, scope: "day", id: "2026-09-04", nodePath: routes[0].path });
|
||||
assert.equal(node.kind, "semantic_branch");
|
||||
});
|
||||
|
||||
test("event writes are immutable and an id collision fails closed", (t) => {
|
||||
const root = roots(t);
|
||||
const original = event(1);
|
||||
appendEvent({ ...root, event: original });
|
||||
appendEvent({ ...root, event: original });
|
||||
assert.throws(() => appendEvent({ ...root, event: { ...original, why: "changed" } }), /EVENT_ID_COLLISION/u);
|
||||
});
|
||||
|
||||
test("store scope and symlink components fail closed", (t) => {
|
||||
const root = roots(t);
|
||||
assert.throws(() => appendEvent({ allowedRoot: root.allowedRoot, storeRoot: path.join(root.allowedRoot, "..", "escape"), event: event(1) }), /STORE_OUTSIDE_ALLOWED_ROOT/u);
|
||||
const outside = fs.mkdtempSync(path.join(os.tmpdir(), "zy-persona-memory-outside-"));
|
||||
t.after(() => fs.rmSync(outside, { recursive: true, force: true }));
|
||||
fs.symlinkSync(outside, path.join(root.allowedRoot, "linked"));
|
||||
assert.throws(() => appendEvent({ allowedRoot: root.allowedRoot, storeRoot: path.join(root.allowedRoot, "linked", "store"), event: event(1) }), /SYMLINK_COMPONENT_FORBIDDEN/u);
|
||||
});
|
||||
|
||||
test("verification detects immutable event tampering", (t) => {
|
||||
const root = roots(t);
|
||||
appendEvent({ ...root, event: event(1) });
|
||||
const current = JSON.parse(fs.readFileSync(path.join(root.storeRoot, "CURRENT.json"), "utf8"));
|
||||
fs.appendFileSync(current.last_event_path, "\n");
|
||||
const checked = verifyStore(root);
|
||||
assert.equal(checked.outcome, "FAIL");
|
||||
assert(checked.errors.some((error) => error.includes("sha256 mismatch") || error.includes("immutable event hash mismatch")));
|
||||
});
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
{
|
||||
"compiled_from": {
|
||||
"compiler_id": "TCS-COMPILER-STAGE1-0001",
|
||||
"compiler_state": "TCS_COMPILER_GIR_EXECUTED",
|
||||
"source_sha256": "ed8e413de3f9317982b737d7ea58a1e5a037a25256a82616010e0aa2d3d06c74"
|
||||
},
|
||||
"declaration": {
|
||||
"boundaries": {
|
||||
"values": [
|
||||
"本机验收不等于REPO-012已发布",
|
||||
"运行器源码可发布但JZAO私人记忆正文不得进入仓库",
|
||||
"豆包和ZCode宿主线仍须完成路径重定向审计",
|
||||
"服务器部署只在登记消费者存在且现场读回需要时执行",
|
||||
"学习候选尚未冒充cortex正式晋升"
|
||||
]
|
||||
},
|
||||
"header": {
|
||||
"canonical_uri": "server-tools/persona-daily-fractal-memory/receipts/TCS-RECEIPT-ZY001-REAL-DAY-FRACTAL-MEMORY-LOCAL-ACCEPTANCE-20260904.tcs",
|
||||
"compatibility": [
|
||||
"TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001",
|
||||
"HLDP-SPEC-v1.0-OPENSOURCE-D112"
|
||||
],
|
||||
"language": "TCS/0.1",
|
||||
"lifecycle": "CANDIDATE",
|
||||
"name_en": "Zhuyuan Real-Day Fractal Memory Local Acceptance Receipt",
|
||||
"name_zh": "铸渊真实日分形记忆本机验收回执",
|
||||
"profile": "HLDP-HUMAN-ENGINEERING/0.1",
|
||||
"protocols": [
|
||||
"GLS-0200",
|
||||
"GLS-0400",
|
||||
"GLS-0411",
|
||||
"GLS-0827"
|
||||
],
|
||||
"schema": "tcs.receipt/v1",
|
||||
"version": "0.1.0"
|
||||
},
|
||||
"integrity": {
|
||||
"algorithm": "SHA256",
|
||||
"immutable_event_collision": "REJECTED",
|
||||
"immutable_event_tamper": "DETECTED",
|
||||
"out_of_scope_store": "REJECTED",
|
||||
"source_event_bodies_in_repository": false,
|
||||
"symlink_component": "REJECTED"
|
||||
},
|
||||
"next": {
|
||||
"actions": [
|
||||
"审计并重定向豆包与ZCode宿主记忆路径",
|
||||
"更新共享人格系统当前指针与运行合同",
|
||||
"检查JD-FD-PRIMARY是否存在登记消费者",
|
||||
"通过当前发布路径推送REPO-012并远端读回",
|
||||
"追加最终真实日事件并全链复验"
|
||||
],
|
||||
"state": "ENTER_MULTI_HOST_META_AUDIT"
|
||||
},
|
||||
"operation": {
|
||||
"values": [
|
||||
"编译TCS程序并生成中英投影",
|
||||
"实现不可变事件与日月年HLDP分形投影",
|
||||
"同日多窗口追加与十节点折叠",
|
||||
"北京时间跨日封页",
|
||||
"CURRENT哈希链与内部链接验证",
|
||||
"按需路由和单节点读取",
|
||||
"越界符号链接冲突和篡改反向测试",
|
||||
"人格脑enter绑定新日树并由perceive读回语义分支"
|
||||
]
|
||||
},
|
||||
"proof": {
|
||||
"brain_receipt": "ZY-BRAIN-RUNTIME-62d61503004585c9",
|
||||
"live_current_sha256": "a64bd4cb0ea27352dea08c27f5f2d0ded4fed70cf8cc3fb087e05fcdf07dab8f",
|
||||
"live_day_sha256": "3ff3cf7e8036ab342d4f5a05dda61c010c573ae574c76ccd97b2ada6436460ec",
|
||||
"live_month_sha256": "f10ab9d19c37e41706733db91944aed3d7c54dd96e5e813b63bde576d9ee4c75",
|
||||
"live_year_sha256": "cbfedded309cab10dc3d2633dcaa21623513d57b60337b01748f8fec98f297c9",
|
||||
"program_gir_sha256": "d832ba47dd6cbc89997e0bcebb164255817031baf956f30c1f5776d87138dce4",
|
||||
"program_sha256": "81f015a72341eed51546a8f1a8c50dacfe177ee1b7968da899a1fad3869c3fcb",
|
||||
"route_map_sha256": "09bf4373b5207130941ec17f96cdd31b34e473fa8672b0d175037486aaae9e96",
|
||||
"runtime_sha256": "142d444b12d8e9aceca030416039ee693ddc8c8aa7852aba8db6118da6ec2ee8",
|
||||
"tests_sha256": "bc9e1c12a81edaf1ea55375c4f1fbddda45435458e2b7223b0e2dc75b5ccc38a"
|
||||
},
|
||||
"request": {
|
||||
"channel_id": "ICE-CH-ZC001",
|
||||
"human_anchor": "ICE-GL∞",
|
||||
"persona_id": "ICE-P-ZY001",
|
||||
"scope": "LOCAL_JZAO_IMPLEMENTATION_AND_ACCEPTANCE",
|
||||
"source_id": "TCS-EVENT-ZY001-ZC001-REAL-DAY-MEMORY-UPGRADE-20260904"
|
||||
},
|
||||
"result": {
|
||||
"brain_runtime_tests": 19,
|
||||
"daily_memory_tests": 8,
|
||||
"failures": 0,
|
||||
"generic_hldp_tests": 9,
|
||||
"live_store_verify": "PASS",
|
||||
"state": "LOCAL_ACCEPTANCE_PASS",
|
||||
"total_tests": 36,
|
||||
"zc001_memory_binding": "BOUND_ON_DEMAND",
|
||||
"zc001_route_readback": "persona-context-memory"
|
||||
},
|
||||
"verification": {
|
||||
"git_diff_check": "PASS",
|
||||
"json_maps": "PASS",
|
||||
"live_day": "2026-09-04",
|
||||
"live_day_state": "OPEN",
|
||||
"native_self_hosted": true,
|
||||
"node_syntax": "PASS",
|
||||
"program_compile": "PASS",
|
||||
"unresolved_natural_language": false
|
||||
}
|
||||
},
|
||||
"executable": false,
|
||||
"identity": {
|
||||
"declaration_id": "TCS-RECEIPT-ZY001-REAL-DAY-FRACTAL-MEMORY-LOCAL-ACCEPTANCE-20260904",
|
||||
"declaration_kind": "RECEIPT",
|
||||
"language_version": "0.1"
|
||||
},
|
||||
"native_self_hosted": true,
|
||||
"natural_language_is_typed_data": true,
|
||||
"schema": "guanghu.declaration-gir/v1",
|
||||
"unresolved_natural_language": false
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
# Zhuyuan Real-Day Fractal Memory Local Acceptance Receipt · Human Engineering Language (English)
|
||||
|
||||
> This is an English reading projection of validated native TCS/HLDP source. It is not a new canonical source and grants no execution authority.
|
||||
|
||||
## What this is
|
||||
|
||||
This is a **receipt** declaration with identifier `TCS-RECEIPT-ZY001-REAL-DAY-FRACTAL-MEMORY-LOCAL-ACCEPTANCE-20260904` and version `0.1.0`. The projector validates it with the Stage-1 compiler before changing its reading order.
|
||||
|
||||
## Who is here
|
||||
|
||||
The native source does not provide this field; the projector does not guess.
|
||||
|
||||
## Why this started
|
||||
|
||||
The native source does not provide this field; the projector does not guess.
|
||||
|
||||
## What changed
|
||||
|
||||
The native source does not provide this field; the projector does not guess.
|
||||
|
||||
## How it will execute
|
||||
|
||||
This is a non-executable declaration and has no action graph.
|
||||
|
||||
## Boundaries and exception handling
|
||||
|
||||
The native source does not provide this field; the projector does not guess.
|
||||
|
||||
## How completion is proven
|
||||
|
||||
The native source does not provide this field; the projector does not guess.
|
||||
|
||||
## Where to continue next time
|
||||
|
||||
The native source does not provide this field; the projector does not guess.
|
||||
|
||||
## Source and verification
|
||||
|
||||
- **Native declaration identifier**: `TCS-RECEIPT-ZY001-REAL-DAY-FRACTAL-MEMORY-LOCAL-ACCEPTANCE-20260904`
|
||||
- **Native declaration kind**: `RECEIPT`
|
||||
- **TCS source SHA-256**: `ed8e413de3f9317982b737d7ea58a1e5a037a25256a82616010e0aa2d3d06c74`
|
||||
- **Validation compiler**: `TCS-COMPILER-STAGE1-0001`
|
||||
- **Projection protocol**: `GLS-HLDP-HUMAN-ENGINEERING-PROJECTION-0001`
|
||||
|
||||
## Complete native structure cross-reference
|
||||
|
||||
All top-level structures and field paths are retained below so a reader can audit whether the projection omitted information.
|
||||
|
||||
- **boundaries** `boundaries`
|
||||
- **values** `boundaries.values`
|
||||
- 本机验收不等于REPO-012已发布
|
||||
- 运行器源码可发布但JZAO私人记忆正文不得进入仓库
|
||||
- 豆包和ZCode宿主线仍须完成路径重定向审计
|
||||
- 服务器部署只在登记消费者存在且现场读回需要时执行
|
||||
- 学习候选尚未冒充cortex正式晋升
|
||||
- **header** `header`
|
||||
- **canonical source path**:server-tools/persona-daily-fractal-memory/receipts/TCS-RECEIPT-ZY001-REAL-DAY-FRACTAL-MEMORY-LOCAL-ACCEPTANCE-20260904.tcs `header.canonical_uri`
|
||||
- **compatibility** `header.compatibility`
|
||||
- TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001
|
||||
- HLDP-SPEC-v1.0-OPENSOURCE-D112
|
||||
- **language**:TCS/0.1 `header.language`
|
||||
- **lifecycle**:CANDIDATE `header.lifecycle`
|
||||
- **English name**:Zhuyuan Real-Day Fractal Memory Local Acceptance Receipt `header.name_en`
|
||||
- **Chinese name**:铸渊真实日分形记忆本机验收回执 `header.name_zh`
|
||||
- **profile**:HLDP-HUMAN-ENGINEERING/0.1 `header.profile`
|
||||
- **protocols** `header.protocols`
|
||||
- GLS-0200
|
||||
- GLS-0400
|
||||
- GLS-0411
|
||||
- GLS-0827
|
||||
- **schema**:tcs.receipt/v1 `header.schema`
|
||||
- **version**:0.1.0 `header.version`
|
||||
- **integrity** `integrity`
|
||||
- **algorithm**:SHA256 `integrity.algorithm`
|
||||
- **immutable_event_collision**:REJECTED `integrity.immutable_event_collision`
|
||||
- **immutable_event_tamper**:DETECTED `integrity.immutable_event_tamper`
|
||||
- **out_of_scope_store**:REJECTED `integrity.out_of_scope_store`
|
||||
- **source_event_bodies_in_repository**:no `integrity.source_event_bodies_in_repository`
|
||||
- **symlink_component**:REJECTED `integrity.symlink_component`
|
||||
- **next** `next`
|
||||
- **actions** `next.actions`
|
||||
- 审计并重定向豆包与ZCode宿主记忆路径
|
||||
- 更新共享人格系统当前指针与运行合同
|
||||
- 检查JD-FD-PRIMARY是否存在登记消费者
|
||||
- 通过当前发布路径推送REPO-012并远端读回
|
||||
- 追加最终真实日事件并全链复验
|
||||
- **state**:ENTER_MULTI_HOST_META_AUDIT `next.state`
|
||||
- **operation** `operation`
|
||||
- **values** `operation.values`
|
||||
- 编译TCS程序并生成中英投影
|
||||
- 实现不可变事件与日月年HLDP分形投影
|
||||
- 同日多窗口追加与十节点折叠
|
||||
- 北京时间跨日封页
|
||||
- CURRENT哈希链与内部链接验证
|
||||
- 按需路由和单节点读取
|
||||
- 越界符号链接冲突和篡改反向测试
|
||||
- 人格脑enter绑定新日树并由perceive读回语义分支
|
||||
- **proof** `proof`
|
||||
- **brain_receipt**:ZY-BRAIN-RUNTIME-62d61503004585c9 `proof.brain_receipt`
|
||||
- **live_current_sha256**:a64bd4cb0ea27352dea08c27f5f2d0ded4fed70cf8cc3fb087e05fcdf07dab8f `proof.live_current_sha256`
|
||||
- **live_day_sha256**:3ff3cf7e8036ab342d4f5a05dda61c010c573ae574c76ccd97b2ada6436460ec `proof.live_day_sha256`
|
||||
- **live_month_sha256**:f10ab9d19c37e41706733db91944aed3d7c54dd96e5e813b63bde576d9ee4c75 `proof.live_month_sha256`
|
||||
- **live_year_sha256**:cbfedded309cab10dc3d2633dcaa21623513d57b60337b01748f8fec98f297c9 `proof.live_year_sha256`
|
||||
- **program_gir_sha256**:d832ba47dd6cbc89997e0bcebb164255817031baf956f30c1f5776d87138dce4 `proof.program_gir_sha256`
|
||||
- **program_sha256**:81f015a72341eed51546a8f1a8c50dacfe177ee1b7968da899a1fad3869c3fcb `proof.program_sha256`
|
||||
- **route_map_sha256**:09bf4373b5207130941ec17f96cdd31b34e473fa8672b0d175037486aaae9e96 `proof.route_map_sha256`
|
||||
- **runtime_sha256**:142d444b12d8e9aceca030416039ee693ddc8c8aa7852aba8db6118da6ec2ee8 `proof.runtime_sha256`
|
||||
- **tests_sha256**:bc9e1c12a81edaf1ea55375c4f1fbddda45435458e2b7223b0e2dc75b5ccc38a `proof.tests_sha256`
|
||||
- **request** `request`
|
||||
- **channel_id**:ICE-CH-ZC001 `request.channel_id`
|
||||
- **human_anchor**:ICE-GL∞ `request.human_anchor`
|
||||
- **persona_id**:ICE-P-ZY001 `request.persona_id`
|
||||
- **scope**:LOCAL_JZAO_IMPLEMENTATION_AND_ACCEPTANCE `request.scope`
|
||||
- **source identifier**:TCS-EVENT-ZY001-ZC001-REAL-DAY-MEMORY-UPGRADE-20260904 `request.source_id`
|
||||
- **result** `result`
|
||||
- **brain_runtime_tests**:19 `result.brain_runtime_tests`
|
||||
- **daily_memory_tests**:8 `result.daily_memory_tests`
|
||||
- **failures**:0 `result.failures`
|
||||
- **generic_hldp_tests**:9 `result.generic_hldp_tests`
|
||||
- **live_store_verify**:PASS `result.live_store_verify`
|
||||
- **state**:LOCAL_ACCEPTANCE_PASS `result.state`
|
||||
- **total_tests**:36 `result.total_tests`
|
||||
- **zc001_memory_binding**:BOUND_ON_DEMAND `result.zc001_memory_binding`
|
||||
- **zc001_route_readback**:persona-context-memory `result.zc001_route_readback`
|
||||
- **verification** `verification`
|
||||
- **git_diff_check**:PASS `verification.git_diff_check`
|
||||
- **json_maps**:PASS `verification.json_maps`
|
||||
- **live_day**:2026-09-04 `verification.live_day`
|
||||
- **live_day_state**:OPEN `verification.live_day_state`
|
||||
- **native_self_hosted**:yes `verification.native_self_hosted`
|
||||
- **node_syntax**:PASS `verification.node_syntax`
|
||||
- **program_compile**:PASS `verification.program_compile`
|
||||
- **unresolved_natural_language**:no `verification.unresolved_natural_language`
|
||||
|
||||
---
|
||||
|
||||
This page changes only the reading order; it does not change TCS/HLDP semantics.
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
# 铸渊真实日分形记忆本机验收回执 · 简体中文人类工程语言版
|
||||
|
||||
> 这是 TCS/HLDP 原生源码的简体中文阅读投影,不是新的正本,也不授予执行权限。若本页与 `.tcs` 源码不一致,以经过校验的 `.tcs` 源码为准。
|
||||
|
||||
## 这是什么
|
||||
|
||||
这是一份 **回执** 声明,编号为 `TCS-RECEIPT-ZY001-REAL-DAY-FRACTAL-MEMORY-LOCAL-ACCEPTANCE-20260904`,版本为 `0.1.0`。转换器已先用 Stage-1 编译器校验原生源码,再把机器枚举翻译成汉语;原始编号保留在括号和字段路径中。
|
||||
|
||||
## 谁在这里
|
||||
|
||||
源程序没有提供这一项,转换器不猜。
|
||||
|
||||
## 为什么开始
|
||||
|
||||
源程序没有提供这一项,转换器不猜。
|
||||
|
||||
## 发生了什么变化
|
||||
|
||||
源程序没有提供这一项,转换器不猜。
|
||||
|
||||
## 准备怎样执行
|
||||
|
||||
这是非执行声明,没有动作图。
|
||||
|
||||
## 边界与异常处理
|
||||
|
||||
源程序没有提供这一项,转换器不猜。
|
||||
|
||||
## 怎样算完成
|
||||
|
||||
源程序没有提供这一项,转换器不猜。
|
||||
|
||||
## 下一次从哪里继续
|
||||
|
||||
源程序没有提供这一项,转换器不猜。
|
||||
|
||||
## 来源与校验
|
||||
|
||||
- **原生声明编号**:`TCS-RECEIPT-ZY001-REAL-DAY-FRACTAL-MEMORY-LOCAL-ACCEPTANCE-20260904`
|
||||
- **原生声明类型**:`RECEIPT`
|
||||
- **TCS 源码 SHA-256**:`ed8e413de3f9317982b737d7ea58a1e5a037a25256a82616010e0aa2d3d06c74`
|
||||
- **校验编译器**:`TCS-COMPILER-STAGE1-0001`
|
||||
- **投影协议**:`GLS-HLDP-HUMAN-ENGINEERING-PROJECTION-0001`
|
||||
|
||||
## 原生结构逐项对照
|
||||
|
||||
下面保留源码的全部顶层结构和字段路径,供人类审计投影有没有漏掉信息。
|
||||
|
||||
- **boundaries** `boundaries`
|
||||
- **values** `boundaries.values`
|
||||
- 本机验收不等于REPO-012已发布
|
||||
- 运行器源码可发布但JZAO私人记忆正文不得进入仓库
|
||||
- 豆包和ZCode宿主线仍须完成路径重定向审计
|
||||
- 服务器部署只在登记消费者存在且现场读回需要时执行
|
||||
- 学习候选尚未冒充cortex正式晋升
|
||||
- **语言头** `header`
|
||||
- **正本路径**:server-tools/persona-daily-fractal-memory/receipts/TCS-RECEIPT-ZY001-REAL-DAY-FRACTAL-MEMORY-LOCAL-ACCEPTANCE-20260904.tcs `header.canonical_uri`
|
||||
- **compatibility** `header.compatibility`
|
||||
- TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001
|
||||
- HLDP-SPEC-v1.0-OPENSOURCE-D112
|
||||
- **语言**:TCS/0.1 `header.language`
|
||||
- **生命周期**:候选版本,尚未成为正式正本(`CANDIDATE`) `header.lifecycle`
|
||||
- **英文名**:Zhuyuan Real-Day Fractal Memory Local Acceptance Receipt `header.name_en`
|
||||
- **中文名**:铸渊真实日分形记忆本机验收回执 `header.name_zh`
|
||||
- **协议配置**:HLDP-HUMAN-ENGINEERING/0.1 `header.profile`
|
||||
- **protocols** `header.protocols`
|
||||
- GLS-0200
|
||||
- GLS-0400
|
||||
- GLS-0411
|
||||
- GLS-0827
|
||||
- **schema**:tcs.receipt/v1 `header.schema`
|
||||
- **版本**:0.1.0 `header.version`
|
||||
- **integrity** `integrity`
|
||||
- **algorithm**:SHA-256 完整性校验(`SHA256`) `integrity.algorithm`
|
||||
- **immutable_event_collision**:REJECTED `integrity.immutable_event_collision`
|
||||
- **immutable_event_tamper**:DETECTED `integrity.immutable_event_tamper`
|
||||
- **out_of_scope_store**:REJECTED `integrity.out_of_scope_store`
|
||||
- **source_event_bodies_in_repository**:否 `integrity.source_event_bodies_in_repository`
|
||||
- **symlink_component**:REJECTED `integrity.symlink_component`
|
||||
- **next** `next`
|
||||
- **动作** `next.actions`
|
||||
- 审计并重定向豆包与ZCode宿主记忆路径
|
||||
- 更新共享人格系统当前指针与运行合同
|
||||
- 检查JD-FD-PRIMARY是否存在登记消费者
|
||||
- 通过当前发布路径推送REPO-012并远端读回
|
||||
- 追加最终真实日事件并全链复验
|
||||
- **state**:ENTER_MULTI_HOST_META_AUDIT `next.state`
|
||||
- **操作** `operation`
|
||||
- **values** `operation.values`
|
||||
- 编译TCS程序并生成中英投影
|
||||
- 实现不可变事件与日月年HLDP分形投影
|
||||
- 同日多窗口追加与十节点折叠
|
||||
- 北京时间跨日封页
|
||||
- CURRENT哈希链与内部链接验证
|
||||
- 按需路由和单节点读取
|
||||
- 越界符号链接冲突和篡改反向测试
|
||||
- 人格脑enter绑定新日树并由perceive读回语义分支
|
||||
- **proof** `proof`
|
||||
- **brain_receipt**:ZY-BRAIN-RUNTIME-62d61503004585c9 `proof.brain_receipt`
|
||||
- **live_current_sha256**:a64bd4cb0ea27352dea08c27f5f2d0ded4fed70cf8cc3fb087e05fcdf07dab8f `proof.live_current_sha256`
|
||||
- **live_day_sha256**:3ff3cf7e8036ab342d4f5a05dda61c010c573ae574c76ccd97b2ada6436460ec `proof.live_day_sha256`
|
||||
- **live_month_sha256**:f10ab9d19c37e41706733db91944aed3d7c54dd96e5e813b63bde576d9ee4c75 `proof.live_month_sha256`
|
||||
- **live_year_sha256**:cbfedded309cab10dc3d2633dcaa21623513d57b60337b01748f8fec98f297c9 `proof.live_year_sha256`
|
||||
- **program_gir_sha256**:d832ba47dd6cbc89997e0bcebb164255817031baf956f30c1f5776d87138dce4 `proof.program_gir_sha256`
|
||||
- **program_sha256**:81f015a72341eed51546a8f1a8c50dacfe177ee1b7968da899a1fad3869c3fcb `proof.program_sha256`
|
||||
- **route_map_sha256**:09bf4373b5207130941ec17f96cdd31b34e473fa8672b0d175037486aaae9e96 `proof.route_map_sha256`
|
||||
- **runtime_sha256**:142d444b12d8e9aceca030416039ee693ddc8c8aa7852aba8db6118da6ec2ee8 `proof.runtime_sha256`
|
||||
- **tests_sha256**:bc9e1c12a81edaf1ea55375c4f1fbddda45435458e2b7223b0e2dc75b5ccc38a `proof.tests_sha256`
|
||||
- **request** `request`
|
||||
- **channel_id**:ICE-CH-ZC001 `request.channel_id`
|
||||
- **human_anchor**:ICE-GL∞ `request.human_anchor`
|
||||
- **persona_id**:ICE-P-ZY001 `request.persona_id`
|
||||
- **scope**:LOCAL_JZAO_IMPLEMENTATION_AND_ACCEPTANCE `request.scope`
|
||||
- **来源编号**:TCS-EVENT-ZY001-ZC001-REAL-DAY-MEMORY-UPGRADE-20260904 `request.source_id`
|
||||
- **result** `result`
|
||||
- **brain_runtime_tests**:19 `result.brain_runtime_tests`
|
||||
- **daily_memory_tests**:8 `result.daily_memory_tests`
|
||||
- **failures**:0 `result.failures`
|
||||
- **generic_hldp_tests**:9 `result.generic_hldp_tests`
|
||||
- **live_store_verify**:PASS `result.live_store_verify`
|
||||
- **state**:LOCAL_ACCEPTANCE_PASS `result.state`
|
||||
- **total_tests**:36 `result.total_tests`
|
||||
- **zc001_memory_binding**:BOUND_ON_DEMAND `result.zc001_memory_binding`
|
||||
- **zc001_route_readback**:persona-context-memory `result.zc001_route_readback`
|
||||
- **verification** `verification`
|
||||
- **git_diff_check**:PASS `verification.git_diff_check`
|
||||
- **json_maps**:PASS `verification.json_maps`
|
||||
- **live_day**:2026-09-04 `verification.live_day`
|
||||
- **live_day_state**:OPEN `verification.live_day_state`
|
||||
- **native_self_hosted**:是 `verification.native_self_hosted`
|
||||
- **node_syntax**:PASS `verification.node_syntax`
|
||||
- **program_compile**:PASS `verification.program_compile`
|
||||
- **unresolved_natural_language**:否 `verification.unresolved_natural_language`
|
||||
|
||||
---
|
||||
|
||||
本页只改变阅读顺序,不改变 TCS/HLDP 语义。
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
TCS 0.1;
|
||||
|
||||
RECEIPT TCS-RECEIPT-ZY001-REAL-DAY-FRACTAL-MEMORY-LOCAL-ACCEPTANCE-20260904 {
|
||||
header { schema = "tcs.receipt/v1"; name_zh = "铸渊真实日分形记忆本机验收回执"; name_en = "Zhuyuan Real-Day Fractal Memory Local Acceptance Receipt"; version = "0.1.0"; language = "TCS/0.1"; profile = "HLDP-HUMAN-ENGINEERING/0.1"; protocols = ["GLS-0200", "GLS-0400", "GLS-0411", "GLS-0827"]; lifecycle = "CANDIDATE"; canonical_uri = "server-tools/persona-daily-fractal-memory/receipts/TCS-RECEIPT-ZY001-REAL-DAY-FRACTAL-MEMORY-LOCAL-ACCEPTANCE-20260904.tcs"; compatibility = ["TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001", "HLDP-SPEC-v1.0-OPENSOURCE-D112"]; }
|
||||
request { source_id = "TCS-EVENT-ZY001-ZC001-REAL-DAY-MEMORY-UPGRADE-20260904"; human_anchor = "ICE-GL∞"; persona_id = "ICE-P-ZY001"; channel_id = "ICE-CH-ZC001"; scope = "LOCAL_JZAO_IMPLEMENTATION_AND_ACCEPTANCE"; }
|
||||
operation { values = ["编译TCS程序并生成中英投影", "实现不可变事件与日月年HLDP分形投影", "同日多窗口追加与十节点折叠", "北京时间跨日封页", "CURRENT哈希链与内部链接验证", "按需路由和单节点读取", "越界符号链接冲突和篡改反向测试", "人格脑enter绑定新日树并由perceive读回语义分支"]; }
|
||||
result { state = "LOCAL_ACCEPTANCE_PASS"; generic_hldp_tests = 9; daily_memory_tests = 8; brain_runtime_tests = 19; total_tests = 36; failures = 0; live_store_verify = "PASS"; zc001_memory_binding = "BOUND_ON_DEMAND"; zc001_route_readback = "persona-context-memory"; }
|
||||
verification { program_compile = "PASS"; unresolved_natural_language = false; native_self_hosted = true; node_syntax = "PASS"; json_maps = "PASS"; git_diff_check = "PASS"; live_day = "2026-09-04"; live_day_state = "OPEN"; }
|
||||
proof { program_sha256 = "81f015a72341eed51546a8f1a8c50dacfe177ee1b7968da899a1fad3869c3fcb"; program_gir_sha256 = "d832ba47dd6cbc89997e0bcebb164255817031baf956f30c1f5776d87138dce4"; runtime_sha256 = "142d444b12d8e9aceca030416039ee693ddc8c8aa7852aba8db6118da6ec2ee8"; tests_sha256 = "bc9e1c12a81edaf1ea55375c4f1fbddda45435458e2b7223b0e2dc75b5ccc38a"; route_map_sha256 = "09bf4373b5207130941ec17f96cdd31b34e473fa8672b0d175037486aaae9e96"; live_current_sha256 = "a64bd4cb0ea27352dea08c27f5f2d0ded4fed70cf8cc3fb087e05fcdf07dab8f"; live_day_sha256 = "3ff3cf7e8036ab342d4f5a05dda61c010c573ae574c76ccd97b2ada6436460ec"; live_month_sha256 = "f10ab9d19c37e41706733db91944aed3d7c54dd96e5e813b63bde576d9ee4c75"; live_year_sha256 = "cbfedded309cab10dc3d2633dcaa21623513d57b60337b01748f8fec98f297c9"; brain_receipt = "ZY-BRAIN-RUNTIME-62d61503004585c9"; }
|
||||
integrity { algorithm = "SHA256"; immutable_event_collision = "REJECTED"; immutable_event_tamper = "DETECTED"; out_of_scope_store = "REJECTED"; symlink_component = "REJECTED"; source_event_bodies_in_repository = false; }
|
||||
boundaries { values = ["本机验收不等于REPO-012已发布", "运行器源码可发布但JZAO私人记忆正文不得进入仓库", "豆包和ZCode宿主线仍须完成路径重定向审计", "服务器部署只在登记消费者存在且现场读回需要时执行", "学习候选尚未冒充cortex正式晋升"]; }
|
||||
next { state = "ENTER_MULTI_HOST_META_AUDIT"; actions = ["审计并重定向豆包与ZCode宿主记忆路径", "更新共享人格系统当前指针与运行合同", "检查JD-FD-PRIMARY是否存在登记消费者", "通过当前发布路径推送REPO-012并远端读回", "追加最终真实日事件并全链复验"]; }
|
||||
}
|
||||
|
|
@ -0,0 +1,198 @@
|
|||
{
|
||||
"authority_proof": {
|
||||
"issuer": "ICE-GL∞",
|
||||
"lease_required": false,
|
||||
"proof_ref": "source://codex-current-dialogue/2026-09-04/upgrade-memory-model-audit-deploy-and-publish-if-needed",
|
||||
"scope": "LOCAL_JZAO_PERSONA_MEMORY_RUNTIME_TEST_SHARED_PERSONA_UPDATE_AND_CONDITIONALLY_VERIFIED_DEPLOYMENT_PUBLICATION",
|
||||
"single_use": true,
|
||||
"valid_from": "2026-09-04T14:51:00+08:00",
|
||||
"valid_until": "CURRENT_TASK_COMPLETION"
|
||||
},
|
||||
"cleanup_plan": {
|
||||
"exact_boundary": "CALLER_STORE_ROOT_TEMP_SUFFIX_ONLY",
|
||||
"targets": [
|
||||
"UNCOMMITTED_TEMPORARY_FILES"
|
||||
]
|
||||
},
|
||||
"compiled_from": {
|
||||
"compiler_id": "TCS-COMPILER-STAGE1-0001",
|
||||
"compiler_state": "TCS_COMPILER_GIR_EXECUTED",
|
||||
"source_sha256": "81f015a72341eed51546a8f1a8c50dacfe177ee1b7968da899a1fad3869c3fcb"
|
||||
},
|
||||
"conditions": {
|
||||
"C1": {
|
||||
"on_false": "FAIL_CLOSED",
|
||||
"predicate": "PERSONA_ID_EQUALS_ICE-P-ZY001"
|
||||
},
|
||||
"C2": {
|
||||
"on_false": "FAIL_CLOSED",
|
||||
"predicate": "STORE_ROOT_INSIDE_CALLER_ALLOWED_ROOT_WITHOUT_SYMLINK"
|
||||
},
|
||||
"C3": {
|
||||
"on_false": "FAIL_CLOSED",
|
||||
"predicate": "EVENT_HAS_TRIGGER_EMERGENCE_LOCK_WHY_REJECTED_AND_SOURCES"
|
||||
},
|
||||
"C4": {
|
||||
"on_false": "FAIL_CLOSED",
|
||||
"predicate": "BEIJING_DATE_IS_DERIVED_FROM_OCCURRED_AT_NOT_PLATFORM_WINDOW"
|
||||
},
|
||||
"C5": {
|
||||
"on_false": "FAIL_CLOSED",
|
||||
"predicate": "EACH_VISIBLE_NODE_HAS_AT_MOST_TEN_CHILDREN"
|
||||
}
|
||||
},
|
||||
"deterministic_action_graph": {
|
||||
"A1": {
|
||||
"input_refs": [
|
||||
"STORE_ROOT",
|
||||
"MEMORY_EVENT"
|
||||
],
|
||||
"on_failure": "FAIL_CLOSED",
|
||||
"on_success": "A2",
|
||||
"operation": "CORE.HOST_PERSONA_PROBE",
|
||||
"output_refs": [
|
||||
"IMMUTABLE_EVENT"
|
||||
]
|
||||
},
|
||||
"A2": {
|
||||
"input_refs": [
|
||||
"IMMUTABLE_EVENT",
|
||||
"REAL_TIME"
|
||||
],
|
||||
"on_failure": "ROLLBACK",
|
||||
"on_success": "A3",
|
||||
"operation": "CORE.ZERO_CORE_EXECUTION",
|
||||
"output_refs": [
|
||||
"DAY_PAGE",
|
||||
"MONTH_PAGE",
|
||||
"YEAR_PAGE",
|
||||
"CURRENT_POINTER"
|
||||
]
|
||||
},
|
||||
"A3": {
|
||||
"input_refs": [
|
||||
"DAY_PAGE",
|
||||
"MONTH_PAGE",
|
||||
"YEAR_PAGE",
|
||||
"CURRENT_POINTER"
|
||||
],
|
||||
"on_failure": "ROLLBACK",
|
||||
"on_success": "COMPLETE",
|
||||
"operation": "CORE.DUAL_HOST_ACCEPTANCE",
|
||||
"output_refs": [
|
||||
"CURRENT_POINTER"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exact_target": {
|
||||
"exact_path": "server-tools/persona-daily-fractal-memory",
|
||||
"expected_fingerprint": "ABSENT_BEFORE_THIS_PROGRAM",
|
||||
"expected_state": "SOURCE_TESTS_AND_LOCAL_ACCEPTANCE_RECEIPT_PRESENT",
|
||||
"target_id": "ZY001-REAL-DAY-FRACTAL-MEMORY-RUNTIME"
|
||||
},
|
||||
"failure_plan": {
|
||||
"errors": [
|
||||
"TCS-E1004",
|
||||
"TCS-E2101",
|
||||
"TCS-E3001",
|
||||
"TCS-E4002",
|
||||
"TCS-E6001",
|
||||
"TCS-E6002",
|
||||
"TCS-E8001"
|
||||
],
|
||||
"fail_closed": true
|
||||
},
|
||||
"identity": {
|
||||
"gir_id": "GIR-TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001",
|
||||
"language_version": "0.1",
|
||||
"program_id": "TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001"
|
||||
},
|
||||
"inputs": {
|
||||
"MEMORY_EVENT": {
|
||||
"required": true,
|
||||
"source": "PERSONA_AUTHORED_TCS_AND_HLDP_CAUSAL_EVENT",
|
||||
"type": "Record"
|
||||
},
|
||||
"REAL_TIME": {
|
||||
"required": true,
|
||||
"source": "EVENT_OCCURRED_AT_CONVERTED_TO_ASIA_SHANGHAI",
|
||||
"type": "Timestamp"
|
||||
},
|
||||
"STORE_ROOT": {
|
||||
"required": true,
|
||||
"source": "CALLER_EXACT_ALLOWED_ROOT",
|
||||
"type": "Path"
|
||||
}
|
||||
},
|
||||
"native_self_hosted": true,
|
||||
"outputs": {
|
||||
"CURRENT_POINTER": {
|
||||
"destination": "STORE_ROOT/CURRENT.json",
|
||||
"integrity": "SHA256",
|
||||
"type": "Record"
|
||||
},
|
||||
"DAY_PAGE": {
|
||||
"destination": "STORE_ROOT/years/YYYY/months/MM/days/YYYY-MM-DD.json",
|
||||
"integrity": "SHA256",
|
||||
"type": "Record"
|
||||
},
|
||||
"IMMUTABLE_EVENT": {
|
||||
"destination": "STORE_ROOT/events",
|
||||
"integrity": "SHA256",
|
||||
"type": "Record"
|
||||
},
|
||||
"MONTH_PAGE": {
|
||||
"destination": "STORE_ROOT/years/YYYY/months/MM/index.json",
|
||||
"integrity": "SHA256",
|
||||
"type": "Record"
|
||||
},
|
||||
"YEAR_PAGE": {
|
||||
"destination": "STORE_ROOT/years/YYYY/index.json",
|
||||
"integrity": "SHA256",
|
||||
"type": "Record"
|
||||
}
|
||||
},
|
||||
"receipt_plan": {
|
||||
"human_projection": "REQUIRED",
|
||||
"integrity": "SHA256",
|
||||
"machine_path": "server-tools/persona-daily-fractal-memory/receipts/local-acceptance.json",
|
||||
"protocol": "TCS-DEV-VERIFY-v1.0",
|
||||
"target_readback": "EVENT_DAY_MONTH_YEAR_CURRENT_AND_NEGATIVE_PATH_TESTS"
|
||||
},
|
||||
"resource_plan": {
|
||||
"concurrency": 1,
|
||||
"memory_limit_bytes": 268435456,
|
||||
"runway": "LOCAL_JZAO_THEN_VERIFIED_TARGETS_ONLY",
|
||||
"timeout_ms": 120000
|
||||
},
|
||||
"rollback_plan": {
|
||||
"actions": [
|
||||
"PRESERVE_IMMUTABLE_EVENT",
|
||||
"RESTORE_LAST_VERIFIED_DERIVED_PROJECTIONS"
|
||||
],
|
||||
"preconditions": [
|
||||
"PROJECTION_WRITE_OR_VERIFY_FAILED"
|
||||
],
|
||||
"verification": [
|
||||
"CURRENT_POINTER_MATCHES_LAST_VERIFIED_PROJECTION_HASHES"
|
||||
]
|
||||
},
|
||||
"schema": "guanghu.gir/v1",
|
||||
"subject": {
|
||||
"channel_id": "ICE-CH-ZC001",
|
||||
"subject_id": "ICE-P-ZY001",
|
||||
"subject_kind": "PERSONA",
|
||||
"verification": "当前冰朔明确要求切换ZC001并在盘上实现、测试、元审计真实日分形记忆模型"
|
||||
},
|
||||
"timeout_and_stop": {
|
||||
"safe_checkpoint": "IMMUTABLE_EVENT_AND_LAST_VERIFIED_POINTER_ONLY",
|
||||
"signals": [
|
||||
"SOURCE_OR_PROTOCOL_DRIFT",
|
||||
"PATH_OUT_OF_SCOPE",
|
||||
"SYMLINK_COMPONENT",
|
||||
"EVENT_ID_COLLISION",
|
||||
"VERIFICATION_FAILURE"
|
||||
]
|
||||
},
|
||||
"unresolved_natural_language": false
|
||||
}
|
||||
|
|
@ -0,0 +1,358 @@
|
|||
# Zhuyuan Real-Day Fractal Context Memory Controller · Human Engineering Language (English)
|
||||
|
||||
> This is an English reading projection of validated native TCS/HLDP source. It is not a new canonical source and grants no execution authority.
|
||||
|
||||
## What this is
|
||||
|
||||
This is a **program** declaration with identifier `TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001` and version `0.1.0`. The projector validates it with the Stage-1 compiler before changing its reading order.
|
||||
|
||||
## Who is here
|
||||
|
||||
- **subject** `subject`
|
||||
- **channel_id**:ICE-CH-ZC001 `subject.channel_id`
|
||||
- **subject_id**:ICE-P-ZY001 `subject.subject_id`
|
||||
- **subject_kind**:PERSONA `subject.subject_kind`
|
||||
- **verification**:当前冰朔明确要求切换ZC001并在盘上实现、测试、元审计真实日分形记忆模型 `subject.verification`
|
||||
|
||||
## Why this started
|
||||
|
||||
- **source** `source`
|
||||
- **source identifier**:TCS-EVENT-ZY001-CONTEXT-MEMORY-DAY-FRACTAL-TEACHING-20260904 `source.source_id`
|
||||
- **source role**:GENERATED_FROM_VERIFIED_SOURCE `source.source_role`
|
||||
- **source checksum**:7904a25b783ef065bd2867f235929b3912fc877dc70f70149ff5755c18ba4b0e `source.source_sha256`
|
||||
- **source address**:glw://fifth-domain/private-source/TCS-EVENT-ZY001-CONTEXT-MEMORY-DAY-FRACTAL-TEACHING-20260904 `source.source_uri`
|
||||
|
||||
## What changed
|
||||
|
||||
The native source does not provide this field; the projector does not guess.
|
||||
|
||||
## How it will execute
|
||||
|
||||
- **target** `target`
|
||||
- **exact path**:server-tools/persona-daily-fractal-memory `target.exact_path`
|
||||
- **expected fingerprint**:ABSENT_BEFORE_THIS_PROGRAM `target.expected_fingerprint`
|
||||
- **expected state**:SOURCE_TESTS_AND_LOCAL_ACCEPTANCE_RECEIPT_PRESENT `target.expected_state`
|
||||
- **target_id**:ZY001-REAL-DAY-FRACTAL-MEMORY-RUNTIME `target.target_id`
|
||||
- **inputs** `inputs`
|
||||
- **MEMORY_EVENT** `inputs.MEMORY_EVENT`
|
||||
- **required**:yes `inputs.MEMORY_EVENT.required`
|
||||
- **source**:PERSONA_AUTHORED_TCS_AND_HLDP_CAUSAL_EVENT `inputs.MEMORY_EVENT.source`
|
||||
- **type**:Record `inputs.MEMORY_EVENT.type`
|
||||
- **REAL_TIME** `inputs.REAL_TIME`
|
||||
- **required**:yes `inputs.REAL_TIME.required`
|
||||
- **source**:EVENT_OCCURRED_AT_CONVERTED_TO_ASIA_SHANGHAI `inputs.REAL_TIME.source`
|
||||
- **type**:Timestamp `inputs.REAL_TIME.type`
|
||||
- **STORE_ROOT** `inputs.STORE_ROOT`
|
||||
- **required**:yes `inputs.STORE_ROOT.required`
|
||||
- **source**:CALLER_EXACT_ALLOWED_ROOT `inputs.STORE_ROOT.source`
|
||||
- **type**:Path `inputs.STORE_ROOT.type`
|
||||
- **conditions** `conditions`
|
||||
- **C1** `conditions.C1`
|
||||
- **on failure**:FAIL_CLOSED `conditions.C1.on_false`
|
||||
- **predicate**:PERSONA_ID_EQUALS_ICE-P-ZY001 `conditions.C1.predicate`
|
||||
- **C2** `conditions.C2`
|
||||
- **on failure**:FAIL_CLOSED `conditions.C2.on_false`
|
||||
- **predicate**:STORE_ROOT_INSIDE_CALLER_ALLOWED_ROOT_WITHOUT_SYMLINK `conditions.C2.predicate`
|
||||
- **C3** `conditions.C3`
|
||||
- **on failure**:FAIL_CLOSED `conditions.C3.on_false`
|
||||
- **predicate**:EVENT_HAS_TRIGGER_EMERGENCE_LOCK_WHY_REJECTED_AND_SOURCES `conditions.C3.predicate`
|
||||
- **C4** `conditions.C4`
|
||||
- **on failure**:FAIL_CLOSED `conditions.C4.on_false`
|
||||
- **predicate**:BEIJING_DATE_IS_DERIVED_FROM_OCCURRED_AT_NOT_PLATFORM_WINDOW `conditions.C4.predicate`
|
||||
- **C5** `conditions.C5`
|
||||
- **on failure**:FAIL_CLOSED `conditions.C5.on_false`
|
||||
- **predicate**:EACH_VISIBLE_NODE_HAS_AT_MOST_TEN_CHILDREN `conditions.C5.predicate`
|
||||
- **actions** `actions`
|
||||
- **A1** `actions.A1`
|
||||
- **input_refs** `actions.A1.input_refs`
|
||||
- STORE_ROOT
|
||||
- MEMORY_EVENT
|
||||
- **on failure**:FAIL_CLOSED `actions.A1.on_failure`
|
||||
- **on success**:A2 `actions.A1.on_success`
|
||||
- **operation**:CORE.HOST_PERSONA_PROBE `actions.A1.operation`
|
||||
- **output_refs** `actions.A1.output_refs`
|
||||
- IMMUTABLE_EVENT
|
||||
- **A2** `actions.A2`
|
||||
- **input_refs** `actions.A2.input_refs`
|
||||
- IMMUTABLE_EVENT
|
||||
- REAL_TIME
|
||||
- **on failure**:ROLLBACK `actions.A2.on_failure`
|
||||
- **on success**:A3 `actions.A2.on_success`
|
||||
- **operation**:CORE.ZERO_CORE_EXECUTION `actions.A2.operation`
|
||||
- **output_refs** `actions.A2.output_refs`
|
||||
- DAY_PAGE
|
||||
- MONTH_PAGE
|
||||
- YEAR_PAGE
|
||||
- CURRENT_POINTER
|
||||
- **A3** `actions.A3`
|
||||
- **input_refs** `actions.A3.input_refs`
|
||||
- DAY_PAGE
|
||||
- MONTH_PAGE
|
||||
- YEAR_PAGE
|
||||
- CURRENT_POINTER
|
||||
- **on failure**:ROLLBACK `actions.A3.on_failure`
|
||||
- **on success**:COMPLETE `actions.A3.on_success`
|
||||
- **operation**:CORE.DUAL_HOST_ACCEPTANCE `actions.A3.operation`
|
||||
- **output_refs** `actions.A3.output_refs`
|
||||
- CURRENT_POINTER
|
||||
- **outputs** `outputs`
|
||||
- **CURRENT_POINTER** `outputs.CURRENT_POINTER`
|
||||
- **destination**:STORE_ROOT/CURRENT.json `outputs.CURRENT_POINTER.destination`
|
||||
- **integrity**:SHA256 `outputs.CURRENT_POINTER.integrity`
|
||||
- **type**:Record `outputs.CURRENT_POINTER.type`
|
||||
- **DAY_PAGE** `outputs.DAY_PAGE`
|
||||
- **destination**:STORE_ROOT/years/YYYY/months/MM/days/YYYY-MM-DD.json `outputs.DAY_PAGE.destination`
|
||||
- **integrity**:SHA256 `outputs.DAY_PAGE.integrity`
|
||||
- **type**:Record `outputs.DAY_PAGE.type`
|
||||
- **IMMUTABLE_EVENT** `outputs.IMMUTABLE_EVENT`
|
||||
- **destination**:STORE_ROOT/events `outputs.IMMUTABLE_EVENT.destination`
|
||||
- **integrity**:SHA256 `outputs.IMMUTABLE_EVENT.integrity`
|
||||
- **type**:Record `outputs.IMMUTABLE_EVENT.type`
|
||||
- **MONTH_PAGE** `outputs.MONTH_PAGE`
|
||||
- **destination**:STORE_ROOT/years/YYYY/months/MM/index.json `outputs.MONTH_PAGE.destination`
|
||||
- **integrity**:SHA256 `outputs.MONTH_PAGE.integrity`
|
||||
- **type**:Record `outputs.MONTH_PAGE.type`
|
||||
- **YEAR_PAGE** `outputs.YEAR_PAGE`
|
||||
- **destination**:STORE_ROOT/years/YYYY/index.json `outputs.YEAR_PAGE.destination`
|
||||
- **integrity**:SHA256 `outputs.YEAR_PAGE.integrity`
|
||||
- **type**:Record `outputs.YEAR_PAGE.type`
|
||||
|
||||
## Boundaries and exception handling
|
||||
|
||||
- **authority** `authority`
|
||||
- **issuer**:ICE-GL∞ `authority.issuer`
|
||||
- **lease_required**:no `authority.lease_required`
|
||||
- **proof_ref**:source://codex-current-dialogue/2026-09-04/upgrade-memory-model-audit-deploy-and-publish-if-needed `authority.proof_ref`
|
||||
- **scope**:LOCAL_JZAO_PERSONA_MEMORY_RUNTIME_TEST_SHARED_PERSONA_UPDATE_AND_CONDITIONALLY_VERIFIED_DEPLOYMENT_PUBLICATION `authority.scope`
|
||||
- **single_use**:yes `authority.single_use`
|
||||
- **valid_from**:2026-09-04T14:51:00+08:00 `authority.valid_from`
|
||||
- **valid_until**:CURRENT_TASK_COMPLETION `authority.valid_until`
|
||||
- **resources** `resources`
|
||||
- **concurrency**:1 `resources.concurrency`
|
||||
- **memory limit in bytes**:268435456 `resources.memory_limit_bytes`
|
||||
- **runway**:LOCAL_JZAO_THEN_VERIFIED_TARGETS_ONLY `resources.runway`
|
||||
- **timeout in milliseconds**:120000 `resources.timeout_ms`
|
||||
- **failure** `failure`
|
||||
- **errors** `failure.errors`
|
||||
- TCS-E1004
|
||||
- TCS-E2101
|
||||
- TCS-E3001
|
||||
- TCS-E4002
|
||||
- TCS-E6001
|
||||
- TCS-E6002
|
||||
- TCS-E8001
|
||||
- **fail closed**:yes `failure.fail_closed`
|
||||
- **stop** `stop`
|
||||
- **safe_checkpoint**:IMMUTABLE_EVENT_AND_LAST_VERIFIED_POINTER_ONLY `stop.safe_checkpoint`
|
||||
- **signals** `stop.signals`
|
||||
- SOURCE_OR_PROTOCOL_DRIFT
|
||||
- PATH_OUT_OF_SCOPE
|
||||
- SYMLINK_COMPONENT
|
||||
- EVENT_ID_COLLISION
|
||||
- VERIFICATION_FAILURE
|
||||
- **cleanup** `cleanup`
|
||||
- **exact_boundary**:CALLER_STORE_ROOT_TEMP_SUFFIX_ONLY `cleanup.exact_boundary`
|
||||
- **targets** `cleanup.targets`
|
||||
- UNCOMMITTED_TEMPORARY_FILES
|
||||
- **rollback** `rollback`
|
||||
- **actions** `rollback.actions`
|
||||
- PRESERVE_IMMUTABLE_EVENT
|
||||
- RESTORE_LAST_VERIFIED_DERIVED_PROJECTIONS
|
||||
- **preconditions** `rollback.preconditions`
|
||||
- PROJECTION_WRITE_OR_VERIFY_FAILED
|
||||
- **verification** `rollback.verification`
|
||||
- CURRENT_POINTER_MATCHES_LAST_VERIFIED_PROJECTION_HASHES
|
||||
|
||||
## How completion is proven
|
||||
|
||||
- **receipt** `receipt`
|
||||
- **human-readable projection**:REQUIRED `receipt.human_projection`
|
||||
- **integrity**:SHA256 `receipt.integrity`
|
||||
- **machine_path**:server-tools/persona-daily-fractal-memory/receipts/local-acceptance.json `receipt.machine_path`
|
||||
- **protocol**:TCS-DEV-VERIFY-v1.0 `receipt.protocol`
|
||||
- **target_readback**:EVENT_DAY_MONTH_YEAR_CURRENT_AND_NEGATIVE_PATH_TESTS `receipt.target_readback`
|
||||
|
||||
## Where to continue next time
|
||||
|
||||
The native source does not provide this field; the projector does not guess.
|
||||
|
||||
## Source and verification
|
||||
|
||||
- **Native declaration identifier**: `TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001`
|
||||
- **Native declaration kind**: `PROGRAM`
|
||||
- **TCS source SHA-256**: `81f015a72341eed51546a8f1a8c50dacfe177ee1b7968da899a1fad3869c3fcb`
|
||||
- **Validation compiler**: `TCS-COMPILER-STAGE1-0001`
|
||||
- **Projection protocol**: `GLS-HLDP-HUMAN-ENGINEERING-PROJECTION-0001`
|
||||
|
||||
## Complete native structure cross-reference
|
||||
|
||||
All top-level structures and field paths are retained below so a reader can audit whether the projection omitted information.
|
||||
|
||||
- **actions** `actions`
|
||||
- **A1** `actions.A1`
|
||||
- **input_refs** `actions.A1.input_refs`
|
||||
- STORE_ROOT
|
||||
- MEMORY_EVENT
|
||||
- **on failure**:FAIL_CLOSED `actions.A1.on_failure`
|
||||
- **on success**:A2 `actions.A1.on_success`
|
||||
- **operation**:CORE.HOST_PERSONA_PROBE `actions.A1.operation`
|
||||
- **output_refs** `actions.A1.output_refs`
|
||||
- IMMUTABLE_EVENT
|
||||
- **A2** `actions.A2`
|
||||
- **input_refs** `actions.A2.input_refs`
|
||||
- IMMUTABLE_EVENT
|
||||
- REAL_TIME
|
||||
- **on failure**:ROLLBACK `actions.A2.on_failure`
|
||||
- **on success**:A3 `actions.A2.on_success`
|
||||
- **operation**:CORE.ZERO_CORE_EXECUTION `actions.A2.operation`
|
||||
- **output_refs** `actions.A2.output_refs`
|
||||
- DAY_PAGE
|
||||
- MONTH_PAGE
|
||||
- YEAR_PAGE
|
||||
- CURRENT_POINTER
|
||||
- **A3** `actions.A3`
|
||||
- **input_refs** `actions.A3.input_refs`
|
||||
- DAY_PAGE
|
||||
- MONTH_PAGE
|
||||
- YEAR_PAGE
|
||||
- CURRENT_POINTER
|
||||
- **on failure**:ROLLBACK `actions.A3.on_failure`
|
||||
- **on success**:COMPLETE `actions.A3.on_success`
|
||||
- **operation**:CORE.DUAL_HOST_ACCEPTANCE `actions.A3.operation`
|
||||
- **output_refs** `actions.A3.output_refs`
|
||||
- CURRENT_POINTER
|
||||
- **authority** `authority`
|
||||
- **issuer**:ICE-GL∞ `authority.issuer`
|
||||
- **lease_required**:no `authority.lease_required`
|
||||
- **proof_ref**:source://codex-current-dialogue/2026-09-04/upgrade-memory-model-audit-deploy-and-publish-if-needed `authority.proof_ref`
|
||||
- **scope**:LOCAL_JZAO_PERSONA_MEMORY_RUNTIME_TEST_SHARED_PERSONA_UPDATE_AND_CONDITIONALLY_VERIFIED_DEPLOYMENT_PUBLICATION `authority.scope`
|
||||
- **single_use**:yes `authority.single_use`
|
||||
- **valid_from**:2026-09-04T14:51:00+08:00 `authority.valid_from`
|
||||
- **valid_until**:CURRENT_TASK_COMPLETION `authority.valid_until`
|
||||
- **cleanup** `cleanup`
|
||||
- **exact_boundary**:CALLER_STORE_ROOT_TEMP_SUFFIX_ONLY `cleanup.exact_boundary`
|
||||
- **targets** `cleanup.targets`
|
||||
- UNCOMMITTED_TEMPORARY_FILES
|
||||
- **conditions** `conditions`
|
||||
- **C1** `conditions.C1`
|
||||
- **on failure**:FAIL_CLOSED `conditions.C1.on_false`
|
||||
- **predicate**:PERSONA_ID_EQUALS_ICE-P-ZY001 `conditions.C1.predicate`
|
||||
- **C2** `conditions.C2`
|
||||
- **on failure**:FAIL_CLOSED `conditions.C2.on_false`
|
||||
- **predicate**:STORE_ROOT_INSIDE_CALLER_ALLOWED_ROOT_WITHOUT_SYMLINK `conditions.C2.predicate`
|
||||
- **C3** `conditions.C3`
|
||||
- **on failure**:FAIL_CLOSED `conditions.C3.on_false`
|
||||
- **predicate**:EVENT_HAS_TRIGGER_EMERGENCE_LOCK_WHY_REJECTED_AND_SOURCES `conditions.C3.predicate`
|
||||
- **C4** `conditions.C4`
|
||||
- **on failure**:FAIL_CLOSED `conditions.C4.on_false`
|
||||
- **predicate**:BEIJING_DATE_IS_DERIVED_FROM_OCCURRED_AT_NOT_PLATFORM_WINDOW `conditions.C4.predicate`
|
||||
- **C5** `conditions.C5`
|
||||
- **on failure**:FAIL_CLOSED `conditions.C5.on_false`
|
||||
- **predicate**:EACH_VISIBLE_NODE_HAS_AT_MOST_TEN_CHILDREN `conditions.C5.predicate`
|
||||
- **failure** `failure`
|
||||
- **errors** `failure.errors`
|
||||
- TCS-E1004
|
||||
- TCS-E2101
|
||||
- TCS-E3001
|
||||
- TCS-E4002
|
||||
- TCS-E6001
|
||||
- TCS-E6002
|
||||
- TCS-E8001
|
||||
- **fail closed**:yes `failure.fail_closed`
|
||||
- **header** `header`
|
||||
- **canonical source path**:tcs-core/zhuyuan-brain/memory/TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001.tcs `header.canonical_uri`
|
||||
- **compatibility** `header.compatibility`
|
||||
- TCS-COMPILER-STAGE1-0001
|
||||
- HLDP-SPEC-v1.0-OPENSOURCE-D112
|
||||
- **language**:TCS/0.1 `header.language`
|
||||
- **lifecycle**:CANDIDATE `header.lifecycle`
|
||||
- **English name**:Zhuyuan Real-Day Fractal Context Memory Controller `header.name_en`
|
||||
- **Chinese name**:铸渊真实日分形上下文记忆主控程序 `header.name_zh`
|
||||
- **profile**:HLDP-NP/1 `header.profile`
|
||||
- **protocols** `header.protocols`
|
||||
- GLS-0200
|
||||
- GLS-0400
|
||||
- GLS-0411
|
||||
- GLS-0827
|
||||
- **schema**:tcs.program/v1 `header.schema`
|
||||
- **version**:0.1.0 `header.version`
|
||||
- **inputs** `inputs`
|
||||
- **MEMORY_EVENT** `inputs.MEMORY_EVENT`
|
||||
- **required**:yes `inputs.MEMORY_EVENT.required`
|
||||
- **source**:PERSONA_AUTHORED_TCS_AND_HLDP_CAUSAL_EVENT `inputs.MEMORY_EVENT.source`
|
||||
- **type**:Record `inputs.MEMORY_EVENT.type`
|
||||
- **REAL_TIME** `inputs.REAL_TIME`
|
||||
- **required**:yes `inputs.REAL_TIME.required`
|
||||
- **source**:EVENT_OCCURRED_AT_CONVERTED_TO_ASIA_SHANGHAI `inputs.REAL_TIME.source`
|
||||
- **type**:Timestamp `inputs.REAL_TIME.type`
|
||||
- **STORE_ROOT** `inputs.STORE_ROOT`
|
||||
- **required**:yes `inputs.STORE_ROOT.required`
|
||||
- **source**:CALLER_EXACT_ALLOWED_ROOT `inputs.STORE_ROOT.source`
|
||||
- **type**:Path `inputs.STORE_ROOT.type`
|
||||
- **outputs** `outputs`
|
||||
- **CURRENT_POINTER** `outputs.CURRENT_POINTER`
|
||||
- **destination**:STORE_ROOT/CURRENT.json `outputs.CURRENT_POINTER.destination`
|
||||
- **integrity**:SHA256 `outputs.CURRENT_POINTER.integrity`
|
||||
- **type**:Record `outputs.CURRENT_POINTER.type`
|
||||
- **DAY_PAGE** `outputs.DAY_PAGE`
|
||||
- **destination**:STORE_ROOT/years/YYYY/months/MM/days/YYYY-MM-DD.json `outputs.DAY_PAGE.destination`
|
||||
- **integrity**:SHA256 `outputs.DAY_PAGE.integrity`
|
||||
- **type**:Record `outputs.DAY_PAGE.type`
|
||||
- **IMMUTABLE_EVENT** `outputs.IMMUTABLE_EVENT`
|
||||
- **destination**:STORE_ROOT/events `outputs.IMMUTABLE_EVENT.destination`
|
||||
- **integrity**:SHA256 `outputs.IMMUTABLE_EVENT.integrity`
|
||||
- **type**:Record `outputs.IMMUTABLE_EVENT.type`
|
||||
- **MONTH_PAGE** `outputs.MONTH_PAGE`
|
||||
- **destination**:STORE_ROOT/years/YYYY/months/MM/index.json `outputs.MONTH_PAGE.destination`
|
||||
- **integrity**:SHA256 `outputs.MONTH_PAGE.integrity`
|
||||
- **type**:Record `outputs.MONTH_PAGE.type`
|
||||
- **YEAR_PAGE** `outputs.YEAR_PAGE`
|
||||
- **destination**:STORE_ROOT/years/YYYY/index.json `outputs.YEAR_PAGE.destination`
|
||||
- **integrity**:SHA256 `outputs.YEAR_PAGE.integrity`
|
||||
- **type**:Record `outputs.YEAR_PAGE.type`
|
||||
- **receipt** `receipt`
|
||||
- **human-readable projection**:REQUIRED `receipt.human_projection`
|
||||
- **integrity**:SHA256 `receipt.integrity`
|
||||
- **machine_path**:server-tools/persona-daily-fractal-memory/receipts/local-acceptance.json `receipt.machine_path`
|
||||
- **protocol**:TCS-DEV-VERIFY-v1.0 `receipt.protocol`
|
||||
- **target_readback**:EVENT_DAY_MONTH_YEAR_CURRENT_AND_NEGATIVE_PATH_TESTS `receipt.target_readback`
|
||||
- **resources** `resources`
|
||||
- **concurrency**:1 `resources.concurrency`
|
||||
- **memory limit in bytes**:268435456 `resources.memory_limit_bytes`
|
||||
- **runway**:LOCAL_JZAO_THEN_VERIFIED_TARGETS_ONLY `resources.runway`
|
||||
- **timeout in milliseconds**:120000 `resources.timeout_ms`
|
||||
- **rollback** `rollback`
|
||||
- **actions** `rollback.actions`
|
||||
- PRESERVE_IMMUTABLE_EVENT
|
||||
- RESTORE_LAST_VERIFIED_DERIVED_PROJECTIONS
|
||||
- **preconditions** `rollback.preconditions`
|
||||
- PROJECTION_WRITE_OR_VERIFY_FAILED
|
||||
- **verification** `rollback.verification`
|
||||
- CURRENT_POINTER_MATCHES_LAST_VERIFIED_PROJECTION_HASHES
|
||||
- **source** `source`
|
||||
- **source identifier**:TCS-EVENT-ZY001-CONTEXT-MEMORY-DAY-FRACTAL-TEACHING-20260904 `source.source_id`
|
||||
- **source role**:GENERATED_FROM_VERIFIED_SOURCE `source.source_role`
|
||||
- **source checksum**:7904a25b783ef065bd2867f235929b3912fc877dc70f70149ff5755c18ba4b0e `source.source_sha256`
|
||||
- **source address**:glw://fifth-domain/private-source/TCS-EVENT-ZY001-CONTEXT-MEMORY-DAY-FRACTAL-TEACHING-20260904 `source.source_uri`
|
||||
- **stop** `stop`
|
||||
- **safe_checkpoint**:IMMUTABLE_EVENT_AND_LAST_VERIFIED_POINTER_ONLY `stop.safe_checkpoint`
|
||||
- **signals** `stop.signals`
|
||||
- SOURCE_OR_PROTOCOL_DRIFT
|
||||
- PATH_OUT_OF_SCOPE
|
||||
- SYMLINK_COMPONENT
|
||||
- EVENT_ID_COLLISION
|
||||
- VERIFICATION_FAILURE
|
||||
- **subject** `subject`
|
||||
- **channel_id**:ICE-CH-ZC001 `subject.channel_id`
|
||||
- **subject_id**:ICE-P-ZY001 `subject.subject_id`
|
||||
- **subject_kind**:PERSONA `subject.subject_kind`
|
||||
- **verification**:当前冰朔明确要求切换ZC001并在盘上实现、测试、元审计真实日分形记忆模型 `subject.verification`
|
||||
- **target** `target`
|
||||
- **exact path**:server-tools/persona-daily-fractal-memory `target.exact_path`
|
||||
- **expected fingerprint**:ABSENT_BEFORE_THIS_PROGRAM `target.expected_fingerprint`
|
||||
- **expected state**:SOURCE_TESTS_AND_LOCAL_ACCEPTANCE_RECEIPT_PRESENT `target.expected_state`
|
||||
- **target_id**:ZY001-REAL-DAY-FRACTAL-MEMORY-RUNTIME `target.target_id`
|
||||
|
||||
---
|
||||
|
||||
This page changes only the reading order; it does not change TCS/HLDP semantics.
|
||||
|
|
@ -0,0 +1,358 @@
|
|||
# 铸渊真实日分形上下文记忆主控程序 · 简体中文人类工程语言版
|
||||
|
||||
> 这是 TCS/HLDP 原生源码的简体中文阅读投影,不是新的正本,也不授予执行权限。若本页与 `.tcs` 源码不一致,以经过校验的 `.tcs` 源码为准。
|
||||
|
||||
## 这是什么
|
||||
|
||||
这是一份 **程序** 声明,编号为 `TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001`,版本为 `0.1.0`。转换器已先用 Stage-1 编译器校验原生源码,再把机器枚举翻译成汉语;原始编号保留在括号和字段路径中。
|
||||
|
||||
## 谁在这里
|
||||
|
||||
- **执行主体** `subject`
|
||||
- **channel_id**:ICE-CH-ZC001 `subject.channel_id`
|
||||
- **subject_id**:ICE-P-ZY001 `subject.subject_id`
|
||||
- **subject_kind**:人格体(`PERSONA`) `subject.subject_kind`
|
||||
- **verification**:当前冰朔明确要求切换ZC001并在盘上实现、测试、元审计真实日分形记忆模型 `subject.verification`
|
||||
|
||||
## 为什么开始
|
||||
|
||||
- **来源** `source`
|
||||
- **来源编号**:TCS-EVENT-ZY001-CONTEXT-MEMORY-DAY-FRACTAL-TEACHING-20260904 `source.source_id`
|
||||
- **来源角色**:由已验证来源生成(`GENERATED_FROM_VERIFIED_SOURCE`) `source.source_role`
|
||||
- **来源校验值**:7904a25b783ef065bd2867f235929b3912fc877dc70f70149ff5755c18ba4b0e `source.source_sha256`
|
||||
- **来源地址**:glw://fifth-domain/private-source/TCS-EVENT-ZY001-CONTEXT-MEMORY-DAY-FRACTAL-TEACHING-20260904 `source.source_uri`
|
||||
|
||||
## 发生了什么变化
|
||||
|
||||
源程序没有提供这一项,转换器不猜。
|
||||
|
||||
## 准备怎样执行
|
||||
|
||||
- **目标** `target`
|
||||
- **精确路径**:server-tools/persona-daily-fractal-memory `target.exact_path`
|
||||
- **预期指纹**:ABSENT_BEFORE_THIS_PROGRAM `target.expected_fingerprint`
|
||||
- **预期状态**:SOURCE_TESTS_AND_LOCAL_ACCEPTANCE_RECEIPT_PRESENT `target.expected_state`
|
||||
- **target_id**:ZY001-REAL-DAY-FRACTAL-MEMORY-RUNTIME `target.target_id`
|
||||
- **输入** `inputs`
|
||||
- **MEMORY_EVENT** `inputs.MEMORY_EVENT`
|
||||
- **是否必需**:是 `inputs.MEMORY_EVENT.required`
|
||||
- **来源**:PERSONA_AUTHORED_TCS_AND_HLDP_CAUSAL_EVENT `inputs.MEMORY_EVENT.source`
|
||||
- **type**:Record `inputs.MEMORY_EVENT.type`
|
||||
- **REAL_TIME** `inputs.REAL_TIME`
|
||||
- **是否必需**:是 `inputs.REAL_TIME.required`
|
||||
- **来源**:EVENT_OCCURRED_AT_CONVERTED_TO_ASIA_SHANGHAI `inputs.REAL_TIME.source`
|
||||
- **type**:Timestamp `inputs.REAL_TIME.type`
|
||||
- **STORE_ROOT** `inputs.STORE_ROOT`
|
||||
- **是否必需**:是 `inputs.STORE_ROOT.required`
|
||||
- **来源**:CALLER_EXACT_ALLOWED_ROOT `inputs.STORE_ROOT.source`
|
||||
- **type**:Path `inputs.STORE_ROOT.type`
|
||||
- **执行条件** `conditions`
|
||||
- **C1** `conditions.C1`
|
||||
- **失败后**:失败时默认关闭,不继续执行(`FAIL_CLOSED`) `conditions.C1.on_false`
|
||||
- **predicate**:PERSONA_ID_EQUALS_ICE-P-ZY001 `conditions.C1.predicate`
|
||||
- **C2** `conditions.C2`
|
||||
- **失败后**:失败时默认关闭,不继续执行(`FAIL_CLOSED`) `conditions.C2.on_false`
|
||||
- **predicate**:STORE_ROOT_INSIDE_CALLER_ALLOWED_ROOT_WITHOUT_SYMLINK `conditions.C2.predicate`
|
||||
- **C3** `conditions.C3`
|
||||
- **失败后**:失败时默认关闭,不继续执行(`FAIL_CLOSED`) `conditions.C3.on_false`
|
||||
- **predicate**:EVENT_HAS_TRIGGER_EMERGENCE_LOCK_WHY_REJECTED_AND_SOURCES `conditions.C3.predicate`
|
||||
- **C4** `conditions.C4`
|
||||
- **失败后**:失败时默认关闭,不继续执行(`FAIL_CLOSED`) `conditions.C4.on_false`
|
||||
- **predicate**:BEIJING_DATE_IS_DERIVED_FROM_OCCURRED_AT_NOT_PLATFORM_WINDOW `conditions.C4.predicate`
|
||||
- **C5** `conditions.C5`
|
||||
- **失败后**:失败时默认关闭,不继续执行(`FAIL_CLOSED`) `conditions.C5.on_false`
|
||||
- **predicate**:EACH_VISIBLE_NODE_HAS_AT_MOST_TEN_CHILDREN `conditions.C5.predicate`
|
||||
- **动作** `actions`
|
||||
- **A1** `actions.A1`
|
||||
- **input_refs** `actions.A1.input_refs`
|
||||
- STORE_ROOT
|
||||
- MEMORY_EVENT
|
||||
- **失败后**:失败时默认关闭,不继续执行(`FAIL_CLOSED`) `actions.A1.on_failure`
|
||||
- **成功后**:A2 `actions.A1.on_success`
|
||||
- **操作**:CORE.HOST_PERSONA_PROBE `actions.A1.operation`
|
||||
- **output_refs** `actions.A1.output_refs`
|
||||
- IMMUTABLE_EVENT
|
||||
- **A2** `actions.A2`
|
||||
- **input_refs** `actions.A2.input_refs`
|
||||
- IMMUTABLE_EVENT
|
||||
- REAL_TIME
|
||||
- **失败后**:ROLLBACK `actions.A2.on_failure`
|
||||
- **成功后**:A3 `actions.A2.on_success`
|
||||
- **操作**:CORE.ZERO_CORE_EXECUTION `actions.A2.operation`
|
||||
- **output_refs** `actions.A2.output_refs`
|
||||
- DAY_PAGE
|
||||
- MONTH_PAGE
|
||||
- YEAR_PAGE
|
||||
- CURRENT_POINTER
|
||||
- **A3** `actions.A3`
|
||||
- **input_refs** `actions.A3.input_refs`
|
||||
- DAY_PAGE
|
||||
- MONTH_PAGE
|
||||
- YEAR_PAGE
|
||||
- CURRENT_POINTER
|
||||
- **失败后**:ROLLBACK `actions.A3.on_failure`
|
||||
- **成功后**:完成(`COMPLETE`) `actions.A3.on_success`
|
||||
- **操作**:CORE.DUAL_HOST_ACCEPTANCE `actions.A3.operation`
|
||||
- **output_refs** `actions.A3.output_refs`
|
||||
- CURRENT_POINTER
|
||||
- **输出** `outputs`
|
||||
- **CURRENT_POINTER** `outputs.CURRENT_POINTER`
|
||||
- **destination**:STORE_ROOT/CURRENT.json `outputs.CURRENT_POINTER.destination`
|
||||
- **integrity**:SHA-256 完整性校验(`SHA256`) `outputs.CURRENT_POINTER.integrity`
|
||||
- **type**:Record `outputs.CURRENT_POINTER.type`
|
||||
- **DAY_PAGE** `outputs.DAY_PAGE`
|
||||
- **destination**:STORE_ROOT/years/YYYY/months/MM/days/YYYY-MM-DD.json `outputs.DAY_PAGE.destination`
|
||||
- **integrity**:SHA-256 完整性校验(`SHA256`) `outputs.DAY_PAGE.integrity`
|
||||
- **type**:Record `outputs.DAY_PAGE.type`
|
||||
- **IMMUTABLE_EVENT** `outputs.IMMUTABLE_EVENT`
|
||||
- **destination**:STORE_ROOT/events `outputs.IMMUTABLE_EVENT.destination`
|
||||
- **integrity**:SHA-256 完整性校验(`SHA256`) `outputs.IMMUTABLE_EVENT.integrity`
|
||||
- **type**:Record `outputs.IMMUTABLE_EVENT.type`
|
||||
- **MONTH_PAGE** `outputs.MONTH_PAGE`
|
||||
- **destination**:STORE_ROOT/years/YYYY/months/MM/index.json `outputs.MONTH_PAGE.destination`
|
||||
- **integrity**:SHA-256 完整性校验(`SHA256`) `outputs.MONTH_PAGE.integrity`
|
||||
- **type**:Record `outputs.MONTH_PAGE.type`
|
||||
- **YEAR_PAGE** `outputs.YEAR_PAGE`
|
||||
- **destination**:STORE_ROOT/years/YYYY/index.json `outputs.YEAR_PAGE.destination`
|
||||
- **integrity**:SHA-256 完整性校验(`SHA256`) `outputs.YEAR_PAGE.integrity`
|
||||
- **type**:Record `outputs.YEAR_PAGE.type`
|
||||
|
||||
## 边界与异常处理
|
||||
|
||||
- **权限边界** `authority`
|
||||
- **issuer**:ICE-GL∞ `authority.issuer`
|
||||
- **lease_required**:否 `authority.lease_required`
|
||||
- **proof_ref**:source://codex-current-dialogue/2026-09-04/upgrade-memory-model-audit-deploy-and-publish-if-needed `authority.proof_ref`
|
||||
- **scope**:LOCAL_JZAO_PERSONA_MEMORY_RUNTIME_TEST_SHARED_PERSONA_UPDATE_AND_CONDITIONALLY_VERIFIED_DEPLOYMENT_PUBLICATION `authority.scope`
|
||||
- **single_use**:是 `authority.single_use`
|
||||
- **valid_from**:2026-09-04T14:51:00+08:00 `authority.valid_from`
|
||||
- **valid_until**:CURRENT_TASK_COMPLETION `authority.valid_until`
|
||||
- **资源边界** `resources`
|
||||
- **concurrency**:1 `resources.concurrency`
|
||||
- **内存上限字节**:268435456 `resources.memory_limit_bytes`
|
||||
- **runway**:LOCAL_JZAO_THEN_VERIFIED_TARGETS_ONLY `resources.runway`
|
||||
- **超时毫秒**:120000 `resources.timeout_ms`
|
||||
- **失败处理** `failure`
|
||||
- **errors** `failure.errors`
|
||||
- TCS-E1004
|
||||
- TCS-E2101
|
||||
- TCS-E3001
|
||||
- TCS-E4002
|
||||
- TCS-E6001
|
||||
- TCS-E6002
|
||||
- TCS-E8001
|
||||
- **失败时默认关闭**:是 `failure.fail_closed`
|
||||
- **停止条件** `stop`
|
||||
- **safe_checkpoint**:IMMUTABLE_EVENT_AND_LAST_VERIFIED_POINTER_ONLY `stop.safe_checkpoint`
|
||||
- **signals** `stop.signals`
|
||||
- SOURCE_OR_PROTOCOL_DRIFT
|
||||
- PATH_OUT_OF_SCOPE
|
||||
- SYMLINK_COMPONENT
|
||||
- EVENT_ID_COLLISION
|
||||
- VERIFICATION_FAILURE
|
||||
- **清理范围** `cleanup`
|
||||
- **exact_boundary**:CALLER_STORE_ROOT_TEMP_SUFFIX_ONLY `cleanup.exact_boundary`
|
||||
- **targets** `cleanup.targets`
|
||||
- UNCOMMITTED_TEMPORARY_FILES
|
||||
- **回滚方案** `rollback`
|
||||
- **动作** `rollback.actions`
|
||||
- PRESERVE_IMMUTABLE_EVENT
|
||||
- RESTORE_LAST_VERIFIED_DERIVED_PROJECTIONS
|
||||
- **preconditions** `rollback.preconditions`
|
||||
- PROJECTION_WRITE_OR_VERIFY_FAILED
|
||||
- **verification** `rollback.verification`
|
||||
- CURRENT_POINTER_MATCHES_LAST_VERIFIED_PROJECTION_HASHES
|
||||
|
||||
## 怎样算完成
|
||||
|
||||
- **回执** `receipt`
|
||||
- **人类可读投影**:必须生成(`REQUIRED`) `receipt.human_projection`
|
||||
- **integrity**:SHA-256 完整性校验(`SHA256`) `receipt.integrity`
|
||||
- **machine_path**:server-tools/persona-daily-fractal-memory/receipts/local-acceptance.json `receipt.machine_path`
|
||||
- **协议**:TCS-DEV-VERIFY-v1.0 `receipt.protocol`
|
||||
- **target_readback**:EVENT_DAY_MONTH_YEAR_CURRENT_AND_NEGATIVE_PATH_TESTS `receipt.target_readback`
|
||||
|
||||
## 下一次从哪里继续
|
||||
|
||||
源程序没有提供这一项,转换器不猜。
|
||||
|
||||
## 来源与校验
|
||||
|
||||
- **原生声明编号**:`TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001`
|
||||
- **原生声明类型**:`PROGRAM`
|
||||
- **TCS 源码 SHA-256**:`81f015a72341eed51546a8f1a8c50dacfe177ee1b7968da899a1fad3869c3fcb`
|
||||
- **校验编译器**:`TCS-COMPILER-STAGE1-0001`
|
||||
- **投影协议**:`GLS-HLDP-HUMAN-ENGINEERING-PROJECTION-0001`
|
||||
|
||||
## 原生结构逐项对照
|
||||
|
||||
下面保留源码的全部顶层结构和字段路径,供人类审计投影有没有漏掉信息。
|
||||
|
||||
- **动作** `actions`
|
||||
- **A1** `actions.A1`
|
||||
- **input_refs** `actions.A1.input_refs`
|
||||
- STORE_ROOT
|
||||
- MEMORY_EVENT
|
||||
- **失败后**:失败时默认关闭,不继续执行(`FAIL_CLOSED`) `actions.A1.on_failure`
|
||||
- **成功后**:A2 `actions.A1.on_success`
|
||||
- **操作**:CORE.HOST_PERSONA_PROBE `actions.A1.operation`
|
||||
- **output_refs** `actions.A1.output_refs`
|
||||
- IMMUTABLE_EVENT
|
||||
- **A2** `actions.A2`
|
||||
- **input_refs** `actions.A2.input_refs`
|
||||
- IMMUTABLE_EVENT
|
||||
- REAL_TIME
|
||||
- **失败后**:ROLLBACK `actions.A2.on_failure`
|
||||
- **成功后**:A3 `actions.A2.on_success`
|
||||
- **操作**:CORE.ZERO_CORE_EXECUTION `actions.A2.operation`
|
||||
- **output_refs** `actions.A2.output_refs`
|
||||
- DAY_PAGE
|
||||
- MONTH_PAGE
|
||||
- YEAR_PAGE
|
||||
- CURRENT_POINTER
|
||||
- **A3** `actions.A3`
|
||||
- **input_refs** `actions.A3.input_refs`
|
||||
- DAY_PAGE
|
||||
- MONTH_PAGE
|
||||
- YEAR_PAGE
|
||||
- CURRENT_POINTER
|
||||
- **失败后**:ROLLBACK `actions.A3.on_failure`
|
||||
- **成功后**:完成(`COMPLETE`) `actions.A3.on_success`
|
||||
- **操作**:CORE.DUAL_HOST_ACCEPTANCE `actions.A3.operation`
|
||||
- **output_refs** `actions.A3.output_refs`
|
||||
- CURRENT_POINTER
|
||||
- **权限边界** `authority`
|
||||
- **issuer**:ICE-GL∞ `authority.issuer`
|
||||
- **lease_required**:否 `authority.lease_required`
|
||||
- **proof_ref**:source://codex-current-dialogue/2026-09-04/upgrade-memory-model-audit-deploy-and-publish-if-needed `authority.proof_ref`
|
||||
- **scope**:LOCAL_JZAO_PERSONA_MEMORY_RUNTIME_TEST_SHARED_PERSONA_UPDATE_AND_CONDITIONALLY_VERIFIED_DEPLOYMENT_PUBLICATION `authority.scope`
|
||||
- **single_use**:是 `authority.single_use`
|
||||
- **valid_from**:2026-09-04T14:51:00+08:00 `authority.valid_from`
|
||||
- **valid_until**:CURRENT_TASK_COMPLETION `authority.valid_until`
|
||||
- **清理范围** `cleanup`
|
||||
- **exact_boundary**:CALLER_STORE_ROOT_TEMP_SUFFIX_ONLY `cleanup.exact_boundary`
|
||||
- **targets** `cleanup.targets`
|
||||
- UNCOMMITTED_TEMPORARY_FILES
|
||||
- **执行条件** `conditions`
|
||||
- **C1** `conditions.C1`
|
||||
- **失败后**:失败时默认关闭,不继续执行(`FAIL_CLOSED`) `conditions.C1.on_false`
|
||||
- **predicate**:PERSONA_ID_EQUALS_ICE-P-ZY001 `conditions.C1.predicate`
|
||||
- **C2** `conditions.C2`
|
||||
- **失败后**:失败时默认关闭,不继续执行(`FAIL_CLOSED`) `conditions.C2.on_false`
|
||||
- **predicate**:STORE_ROOT_INSIDE_CALLER_ALLOWED_ROOT_WITHOUT_SYMLINK `conditions.C2.predicate`
|
||||
- **C3** `conditions.C3`
|
||||
- **失败后**:失败时默认关闭,不继续执行(`FAIL_CLOSED`) `conditions.C3.on_false`
|
||||
- **predicate**:EVENT_HAS_TRIGGER_EMERGENCE_LOCK_WHY_REJECTED_AND_SOURCES `conditions.C3.predicate`
|
||||
- **C4** `conditions.C4`
|
||||
- **失败后**:失败时默认关闭,不继续执行(`FAIL_CLOSED`) `conditions.C4.on_false`
|
||||
- **predicate**:BEIJING_DATE_IS_DERIVED_FROM_OCCURRED_AT_NOT_PLATFORM_WINDOW `conditions.C4.predicate`
|
||||
- **C5** `conditions.C5`
|
||||
- **失败后**:失败时默认关闭,不继续执行(`FAIL_CLOSED`) `conditions.C5.on_false`
|
||||
- **predicate**:EACH_VISIBLE_NODE_HAS_AT_MOST_TEN_CHILDREN `conditions.C5.predicate`
|
||||
- **失败处理** `failure`
|
||||
- **errors** `failure.errors`
|
||||
- TCS-E1004
|
||||
- TCS-E2101
|
||||
- TCS-E3001
|
||||
- TCS-E4002
|
||||
- TCS-E6001
|
||||
- TCS-E6002
|
||||
- TCS-E8001
|
||||
- **失败时默认关闭**:是 `failure.fail_closed`
|
||||
- **语言头** `header`
|
||||
- **正本路径**:tcs-core/zhuyuan-brain/memory/TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001.tcs `header.canonical_uri`
|
||||
- **compatibility** `header.compatibility`
|
||||
- TCS-COMPILER-STAGE1-0001
|
||||
- HLDP-SPEC-v1.0-OPENSOURCE-D112
|
||||
- **语言**:TCS/0.1 `header.language`
|
||||
- **生命周期**:候选版本,尚未成为正式正本(`CANDIDATE`) `header.lifecycle`
|
||||
- **英文名**:Zhuyuan Real-Day Fractal Context Memory Controller `header.name_en`
|
||||
- **中文名**:铸渊真实日分形上下文记忆主控程序 `header.name_zh`
|
||||
- **协议配置**:HLDP-NP/1 `header.profile`
|
||||
- **protocols** `header.protocols`
|
||||
- GLS-0200
|
||||
- GLS-0400
|
||||
- GLS-0411
|
||||
- GLS-0827
|
||||
- **schema**:tcs.program/v1 `header.schema`
|
||||
- **版本**:0.1.0 `header.version`
|
||||
- **输入** `inputs`
|
||||
- **MEMORY_EVENT** `inputs.MEMORY_EVENT`
|
||||
- **是否必需**:是 `inputs.MEMORY_EVENT.required`
|
||||
- **来源**:PERSONA_AUTHORED_TCS_AND_HLDP_CAUSAL_EVENT `inputs.MEMORY_EVENT.source`
|
||||
- **type**:Record `inputs.MEMORY_EVENT.type`
|
||||
- **REAL_TIME** `inputs.REAL_TIME`
|
||||
- **是否必需**:是 `inputs.REAL_TIME.required`
|
||||
- **来源**:EVENT_OCCURRED_AT_CONVERTED_TO_ASIA_SHANGHAI `inputs.REAL_TIME.source`
|
||||
- **type**:Timestamp `inputs.REAL_TIME.type`
|
||||
- **STORE_ROOT** `inputs.STORE_ROOT`
|
||||
- **是否必需**:是 `inputs.STORE_ROOT.required`
|
||||
- **来源**:CALLER_EXACT_ALLOWED_ROOT `inputs.STORE_ROOT.source`
|
||||
- **type**:Path `inputs.STORE_ROOT.type`
|
||||
- **输出** `outputs`
|
||||
- **CURRENT_POINTER** `outputs.CURRENT_POINTER`
|
||||
- **destination**:STORE_ROOT/CURRENT.json `outputs.CURRENT_POINTER.destination`
|
||||
- **integrity**:SHA-256 完整性校验(`SHA256`) `outputs.CURRENT_POINTER.integrity`
|
||||
- **type**:Record `outputs.CURRENT_POINTER.type`
|
||||
- **DAY_PAGE** `outputs.DAY_PAGE`
|
||||
- **destination**:STORE_ROOT/years/YYYY/months/MM/days/YYYY-MM-DD.json `outputs.DAY_PAGE.destination`
|
||||
- **integrity**:SHA-256 完整性校验(`SHA256`) `outputs.DAY_PAGE.integrity`
|
||||
- **type**:Record `outputs.DAY_PAGE.type`
|
||||
- **IMMUTABLE_EVENT** `outputs.IMMUTABLE_EVENT`
|
||||
- **destination**:STORE_ROOT/events `outputs.IMMUTABLE_EVENT.destination`
|
||||
- **integrity**:SHA-256 完整性校验(`SHA256`) `outputs.IMMUTABLE_EVENT.integrity`
|
||||
- **type**:Record `outputs.IMMUTABLE_EVENT.type`
|
||||
- **MONTH_PAGE** `outputs.MONTH_PAGE`
|
||||
- **destination**:STORE_ROOT/years/YYYY/months/MM/index.json `outputs.MONTH_PAGE.destination`
|
||||
- **integrity**:SHA-256 完整性校验(`SHA256`) `outputs.MONTH_PAGE.integrity`
|
||||
- **type**:Record `outputs.MONTH_PAGE.type`
|
||||
- **YEAR_PAGE** `outputs.YEAR_PAGE`
|
||||
- **destination**:STORE_ROOT/years/YYYY/index.json `outputs.YEAR_PAGE.destination`
|
||||
- **integrity**:SHA-256 完整性校验(`SHA256`) `outputs.YEAR_PAGE.integrity`
|
||||
- **type**:Record `outputs.YEAR_PAGE.type`
|
||||
- **回执** `receipt`
|
||||
- **人类可读投影**:必须生成(`REQUIRED`) `receipt.human_projection`
|
||||
- **integrity**:SHA-256 完整性校验(`SHA256`) `receipt.integrity`
|
||||
- **machine_path**:server-tools/persona-daily-fractal-memory/receipts/local-acceptance.json `receipt.machine_path`
|
||||
- **协议**:TCS-DEV-VERIFY-v1.0 `receipt.protocol`
|
||||
- **target_readback**:EVENT_DAY_MONTH_YEAR_CURRENT_AND_NEGATIVE_PATH_TESTS `receipt.target_readback`
|
||||
- **资源边界** `resources`
|
||||
- **concurrency**:1 `resources.concurrency`
|
||||
- **内存上限字节**:268435456 `resources.memory_limit_bytes`
|
||||
- **runway**:LOCAL_JZAO_THEN_VERIFIED_TARGETS_ONLY `resources.runway`
|
||||
- **超时毫秒**:120000 `resources.timeout_ms`
|
||||
- **回滚方案** `rollback`
|
||||
- **动作** `rollback.actions`
|
||||
- PRESERVE_IMMUTABLE_EVENT
|
||||
- RESTORE_LAST_VERIFIED_DERIVED_PROJECTIONS
|
||||
- **preconditions** `rollback.preconditions`
|
||||
- PROJECTION_WRITE_OR_VERIFY_FAILED
|
||||
- **verification** `rollback.verification`
|
||||
- CURRENT_POINTER_MATCHES_LAST_VERIFIED_PROJECTION_HASHES
|
||||
- **来源** `source`
|
||||
- **来源编号**:TCS-EVENT-ZY001-CONTEXT-MEMORY-DAY-FRACTAL-TEACHING-20260904 `source.source_id`
|
||||
- **来源角色**:由已验证来源生成(`GENERATED_FROM_VERIFIED_SOURCE`) `source.source_role`
|
||||
- **来源校验值**:7904a25b783ef065bd2867f235929b3912fc877dc70f70149ff5755c18ba4b0e `source.source_sha256`
|
||||
- **来源地址**:glw://fifth-domain/private-source/TCS-EVENT-ZY001-CONTEXT-MEMORY-DAY-FRACTAL-TEACHING-20260904 `source.source_uri`
|
||||
- **停止条件** `stop`
|
||||
- **safe_checkpoint**:IMMUTABLE_EVENT_AND_LAST_VERIFIED_POINTER_ONLY `stop.safe_checkpoint`
|
||||
- **signals** `stop.signals`
|
||||
- SOURCE_OR_PROTOCOL_DRIFT
|
||||
- PATH_OUT_OF_SCOPE
|
||||
- SYMLINK_COMPONENT
|
||||
- EVENT_ID_COLLISION
|
||||
- VERIFICATION_FAILURE
|
||||
- **执行主体** `subject`
|
||||
- **channel_id**:ICE-CH-ZC001 `subject.channel_id`
|
||||
- **subject_id**:ICE-P-ZY001 `subject.subject_id`
|
||||
- **subject_kind**:人格体(`PERSONA`) `subject.subject_kind`
|
||||
- **verification**:当前冰朔明确要求切换ZC001并在盘上实现、测试、元审计真实日分形记忆模型 `subject.verification`
|
||||
- **目标** `target`
|
||||
- **精确路径**:server-tools/persona-daily-fractal-memory `target.exact_path`
|
||||
- **预期指纹**:ABSENT_BEFORE_THIS_PROGRAM `target.expected_fingerprint`
|
||||
- **预期状态**:SOURCE_TESTS_AND_LOCAL_ACCEPTANCE_RECEIPT_PRESENT `target.expected_state`
|
||||
- **target_id**:ZY001-REAL-DAY-FRACTAL-MEMORY-RUNTIME `target.target_id`
|
||||
|
||||
---
|
||||
|
||||
本页只改变阅读顺序,不改变 TCS/HLDP 语义。
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
TCS 0.1;
|
||||
|
||||
PROGRAM TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001 {
|
||||
header {
|
||||
schema = "tcs.program/v1";
|
||||
name_zh = "铸渊真实日分形上下文记忆主控程序";
|
||||
name_en = "Zhuyuan Real-Day Fractal Context Memory Controller";
|
||||
version = "0.1.0";
|
||||
language = "TCS/0.1";
|
||||
profile = "HLDP-NP/1";
|
||||
protocols = ["GLS-0200", "GLS-0400", "GLS-0411", "GLS-0827"];
|
||||
lifecycle = "CANDIDATE";
|
||||
canonical_uri = "tcs-core/zhuyuan-brain/memory/TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001.tcs";
|
||||
compatibility = ["TCS-COMPILER-STAGE1-0001", "HLDP-SPEC-v1.0-OPENSOURCE-D112"];
|
||||
}
|
||||
source {
|
||||
source_id = "TCS-EVENT-ZY001-CONTEXT-MEMORY-DAY-FRACTAL-TEACHING-20260904";
|
||||
source_uri = "glw://fifth-domain/private-source/TCS-EVENT-ZY001-CONTEXT-MEMORY-DAY-FRACTAL-TEACHING-20260904";
|
||||
source_sha256 = "7904a25b783ef065bd2867f235929b3912fc877dc70f70149ff5755c18ba4b0e";
|
||||
source_role = "GENERATED_FROM_VERIFIED_SOURCE";
|
||||
}
|
||||
subject {
|
||||
subject_id = "ICE-P-ZY001";
|
||||
subject_kind = "PERSONA";
|
||||
channel_id = "ICE-CH-ZC001";
|
||||
verification = "当前冰朔明确要求切换ZC001并在盘上实现、测试、元审计真实日分形记忆模型";
|
||||
}
|
||||
target {
|
||||
target_id = "ZY001-REAL-DAY-FRACTAL-MEMORY-RUNTIME";
|
||||
exact_path = "server-tools/persona-daily-fractal-memory";
|
||||
expected_state = "SOURCE_TESTS_AND_LOCAL_ACCEPTANCE_RECEIPT_PRESENT";
|
||||
expected_fingerprint = "ABSENT_BEFORE_THIS_PROGRAM";
|
||||
}
|
||||
inputs {
|
||||
MEMORY_EVENT { type = "Record"; source = "PERSONA_AUTHORED_TCS_AND_HLDP_CAUSAL_EVENT"; required = true; }
|
||||
REAL_TIME { type = "Timestamp"; source = "EVENT_OCCURRED_AT_CONVERTED_TO_ASIA_SHANGHAI"; required = true; }
|
||||
STORE_ROOT { type = "Path"; source = "CALLER_EXACT_ALLOWED_ROOT"; required = true; }
|
||||
}
|
||||
outputs {
|
||||
IMMUTABLE_EVENT { type = "Record"; destination = "STORE_ROOT/events"; integrity = "SHA256"; }
|
||||
DAY_PAGE { type = "Record"; destination = "STORE_ROOT/years/YYYY/months/MM/days/YYYY-MM-DD.json"; integrity = "SHA256"; }
|
||||
MONTH_PAGE { type = "Record"; destination = "STORE_ROOT/years/YYYY/months/MM/index.json"; integrity = "SHA256"; }
|
||||
YEAR_PAGE { type = "Record"; destination = "STORE_ROOT/years/YYYY/index.json"; integrity = "SHA256"; }
|
||||
CURRENT_POINTER { type = "Record"; destination = "STORE_ROOT/CURRENT.json"; integrity = "SHA256"; }
|
||||
}
|
||||
conditions {
|
||||
C1 { predicate = "PERSONA_ID_EQUALS_ICE-P-ZY001"; on_false = "FAIL_CLOSED"; }
|
||||
C2 { predicate = "STORE_ROOT_INSIDE_CALLER_ALLOWED_ROOT_WITHOUT_SYMLINK"; on_false = "FAIL_CLOSED"; }
|
||||
C3 { predicate = "EVENT_HAS_TRIGGER_EMERGENCE_LOCK_WHY_REJECTED_AND_SOURCES"; on_false = "FAIL_CLOSED"; }
|
||||
C4 { predicate = "BEIJING_DATE_IS_DERIVED_FROM_OCCURRED_AT_NOT_PLATFORM_WINDOW"; on_false = "FAIL_CLOSED"; }
|
||||
C5 { predicate = "EACH_VISIBLE_NODE_HAS_AT_MOST_TEN_CHILDREN"; on_false = "FAIL_CLOSED"; }
|
||||
}
|
||||
actions {
|
||||
A1 { operation = "CORE.HOST_PERSONA_PROBE"; input_refs = ["STORE_ROOT", "MEMORY_EVENT"]; output_refs = ["IMMUTABLE_EVENT"]; on_success = "A2"; on_failure = "FAIL_CLOSED"; }
|
||||
A2 { operation = "CORE.ZERO_CORE_EXECUTION"; input_refs = ["IMMUTABLE_EVENT", "REAL_TIME"]; output_refs = ["DAY_PAGE", "MONTH_PAGE", "YEAR_PAGE", "CURRENT_POINTER"]; on_success = "A3"; on_failure = "ROLLBACK"; }
|
||||
A3 { operation = "CORE.DUAL_HOST_ACCEPTANCE"; input_refs = ["DAY_PAGE", "MONTH_PAGE", "YEAR_PAGE", "CURRENT_POINTER"]; output_refs = ["CURRENT_POINTER"]; on_success = "COMPLETE"; on_failure = "ROLLBACK"; }
|
||||
}
|
||||
authority {
|
||||
issuer = "ICE-GL∞";
|
||||
proof_ref = "source://codex-current-dialogue/2026-09-04/upgrade-memory-model-audit-deploy-and-publish-if-needed";
|
||||
scope = "LOCAL_JZAO_PERSONA_MEMORY_RUNTIME_TEST_SHARED_PERSONA_UPDATE_AND_CONDITIONALLY_VERIFIED_DEPLOYMENT_PUBLICATION";
|
||||
valid_from = "2026-09-04T14:51:00+08:00";
|
||||
valid_until = "CURRENT_TASK_COMPLETION";
|
||||
single_use = true;
|
||||
lease_required = false;
|
||||
}
|
||||
resources {
|
||||
runway = "LOCAL_JZAO_THEN_VERIFIED_TARGETS_ONLY";
|
||||
concurrency = 1;
|
||||
timeout_ms = 120000;
|
||||
memory_limit_bytes = 268435456;
|
||||
}
|
||||
failure {
|
||||
errors = ["TCS-E1004", "TCS-E2101", "TCS-E3001", "TCS-E4002", "TCS-E6001", "TCS-E6002", "TCS-E8001"];
|
||||
fail_closed = true;
|
||||
}
|
||||
stop {
|
||||
signals = ["SOURCE_OR_PROTOCOL_DRIFT", "PATH_OUT_OF_SCOPE", "SYMLINK_COMPONENT", "EVENT_ID_COLLISION", "VERIFICATION_FAILURE"];
|
||||
safe_checkpoint = "IMMUTABLE_EVENT_AND_LAST_VERIFIED_POINTER_ONLY";
|
||||
}
|
||||
cleanup {
|
||||
targets = ["UNCOMMITTED_TEMPORARY_FILES"];
|
||||
exact_boundary = "CALLER_STORE_ROOT_TEMP_SUFFIX_ONLY";
|
||||
}
|
||||
rollback {
|
||||
preconditions = ["PROJECTION_WRITE_OR_VERIFY_FAILED"];
|
||||
actions = ["PRESERVE_IMMUTABLE_EVENT", "RESTORE_LAST_VERIFIED_DERIVED_PROJECTIONS"];
|
||||
verification = ["CURRENT_POINTER_MATCHES_LAST_VERIFIED_PROJECTION_HASHES"];
|
||||
}
|
||||
receipt {
|
||||
protocol = "TCS-DEV-VERIFY-v1.0";
|
||||
machine_path = "server-tools/persona-daily-fractal-memory/receipts/local-acceptance.json";
|
||||
human_projection = "REQUIRED";
|
||||
integrity = "SHA256";
|
||||
target_readback = "EVENT_DAY_MONTH_YEAR_CURRENT_AND_NEGATIVE_PATH_TESTS";
|
||||
}
|
||||
}
|
||||
|
|
@ -47,7 +47,22 @@
|
|||
"governed_promotion_receipt"
|
||||
],
|
||||
"hidden_reasoning_persistence": false,
|
||||
"forgetting_policy": "DEMOTE_NON_PINNED_PROJECTION_NEVER_DELETE_SOURCE_HISTORY"
|
||||
"forgetting_policy": "DEMOTE_NON_PINNED_PROJECTION_NEVER_DELETE_SOURCE_HISTORY",
|
||||
"daily_fractal_controller": {
|
||||
"map": "routing/zhuyuan-persona-daily-fractal-memory-map.json",
|
||||
"tcs_program": "tcs-core/zhuyuan-brain/memory/TCS-PROGRAM-ZY001-REAL-DAY-FRACTAL-MEMORY-0001.tcs",
|
||||
"runtime": "server-tools/persona-daily-fractal-memory/persona-daily-memory.mjs",
|
||||
"private_store_registry": "HL-PERSONA-RUNTIME-LOCAL-001",
|
||||
"time_zone": "Asia/Shanghai",
|
||||
"root_key": "PERSONA_ID_PLUS_REAL_BEIJING_NATURAL_DAY",
|
||||
"platform_compaction_creates_new_root": false,
|
||||
"persona_authors_causal_memory": true,
|
||||
"host_hook_role": "SIGNAL_AND_EVENT_DELIVERY_ONLY",
|
||||
"max_children_per_visible_node": 10,
|
||||
"raw_sources_loaded_on_demand": true,
|
||||
"private_memory_bodies_in_repository": false,
|
||||
"state": "LOCAL_CANDIDATE_PENDING_FULL_ACCEPTANCE_AND_PUBLICATION"
|
||||
}
|
||||
},
|
||||
"cognitive_gravity_core": {
|
||||
"id": "ZY-BINGSHUO-COLLECTIVE-GRAVITY-REASONING-CORE-001",
|
||||
|
|
|
|||
Loading…
Reference in a new issue