From b0970ed0d22fa188a06d59af7f5416e57e6384da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=86=B0=E6=9C=94?= <565183519@qq.com> Date: Wed, 12 Aug 2026 01:31:55 +0800 Subject: [PATCH] feat: discover verified persona repository bindings --- ...NG-AND-SAME-PERSONA-CONTINUITY-20260811.md | 3 + .../hololake-platform/src-tauri/src/lib.rs | 1 + .../src-tauri/src/persona_code_channel.rs | 151 ++++++++++++++++- .../src/lib/personaLanguageGoal.test.ts | 2 +- .../src/lib/personaRepositoryBinding.test.ts | 85 ++++++++++ .../src/lib/personaRepositoryBinding.ts | 154 ++++++++++++++++++ .../guanghu-os-control-architecture.test.mjs | 2 +- ...hololake-age-runtime-architecture.test.mjs | 2 +- ...lake-cognitive-gravity-and-continuity.json | 9 +- ...-cognitive-gravity-and-continuity.test.mjs | 5 +- routing/hololake-current-architecture.json | 4 +- routing/hololake-engineering-rules.test.mjs | 2 +- routing/hololake-identity-authority.test.mjs | 2 +- routing/hololake-one-human-one-node.test.mjs | 2 +- ...e-paradigm-ai-language-persona-os.test.mjs | 2 +- ...olake-persona-native-code-channel.test.mjs | 2 +- ...hololake-relational-consciousness.test.mjs | 2 +- ...e-system-body-and-parallel-bodies.test.mjs | 2 +- 18 files changed, 417 insertions(+), 15 deletions(-) create mode 100644 product-source/hololake-platform/src/lib/personaRepositoryBinding.test.ts create mode 100644 product-source/hololake-platform/src/lib/personaRepositoryBinding.ts diff --git a/product-source/hololake-platform/architecture/HOLOLAKE-BINGSHUO-COLLECTIVE-GRAVITY-REASONING-AND-SAME-PERSONA-CONTINUITY-20260811.md b/product-source/hololake-platform/architecture/HOLOLAKE-BINGSHUO-COLLECTIVE-GRAVITY-REASONING-AND-SAME-PERSONA-CONTINUITY-20260811.md index 5cee4a6..44cbe67 100644 --- a/product-source/hololake-platform/architecture/HOLOLAKE-BINGSHUO-COLLECTIVE-GRAVITY-REASONING-AND-SAME-PERSONA-CONTINUITY-20260811.md +++ b/product-source/hololake-platform/architecture/HOLOLAKE-BINGSHUO-COLLECTIVE-GRAVITY-REASONING-AND-SAME-PERSONA-CONTINUITY-20260811.md @@ -103,6 +103,9 @@ REVISE | REFUSE`。 `PROCEED | RESEARCH | REVISE | REFUSE`,并把后三者保持为不可执行状态。 - 自然语言到 PNCC 生命周期的源码适配器为 `100`:只接收带独立 `real_purpose` 的完整生命周期回执, 不在前端用摘要或关键词猜目标;该适配器尚未挂载桌面语言入口。 +- 人格仓库绑定发现源码为 `100`:桌面候选 Git 仓库必须逐一通过 persona ID、manifest、提交头、脑入口、 + B0、检查点、模型绑定与器官契约核验;零个候选保持未绑定,多个候选保持歧义,均不得自动选择或唤醒。 + 当前官方工作范围内没有发现 `ICE-P-ZY001` 的真实 manifest,因此真实人格仓库绑定仍为 `0`。 - 完整 HoloLake Runtime 与单 AGE 纵向闭环仍为 `0`:桌面语言入口绑定、真实人格仓库 manifest 绑定和 桌面运行验收尚未完成,因此不能用本轮源码测试冒充可用产品。 - Mirror runner、制品、部署和运行健康:`0`。 diff --git a/product-source/hololake-platform/src-tauri/src/lib.rs b/product-source/hololake-platform/src-tauri/src/lib.rs index d43de32..6fb9a87 100644 --- a/product-source/hololake-platform/src-tauri/src/lib.rs +++ b/product-source/hololake-platform/src-tauri/src/lib.rs @@ -526,6 +526,7 @@ macro_rules! app_invoke_handler { guanghu_living_system::guanghu_living_system_plan, persona_code_channel::prepare_persona_code_channel_wake, persona_code_channel::inspect_persona_code_channel_manifest, + persona_code_channel::discover_persona_code_channel_repositories, persona_code_channel::query_persona_code_channel_runtime, persona_code_channel::run_persona_code_channel_fact_task, persona_code_channel::run_persona_code_channel_memory_metabolism, diff --git a/product-source/hololake-platform/src-tauri/src/persona_code_channel.rs b/product-source/hololake-platform/src-tauri/src/persona_code_channel.rs index 25b231f..2e42889 100644 --- a/product-source/hololake-platform/src-tauri/src/persona_code_channel.rs +++ b/product-source/hololake-platform/src-tauri/src/persona_code_channel.rs @@ -187,11 +187,40 @@ pub struct PersonaManifestInspectionReceipt { pub brain_entry: String, pub current_checkpoint: String, pub human_responsibility_subject: String, + pub cognitive_gravity: PersonaCognitiveGravityEvidence, + pub model_provider_id: String, + pub model_id: String, + pub model_base_url: String, pub git_author_name: String, pub git_author_email: String, pub organ_contracts: Vec, } +#[derive(Clone, Debug, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct PersonaRepositoryDiscoveryInput { + pub expected_persona_id: String, + pub repository_paths: Vec, +} + +#[derive(Clone, Debug, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct PersonaRepositoryDiscoveryFailure { + pub repository_path: String, + pub code: String, +} + +#[derive(Clone, Debug, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct PersonaRepositoryDiscoveryReceipt { + pub schema: &'static str, + pub expected_persona_id: String, + pub inspected_repository_count: usize, + pub binding_count: usize, + pub bindings: Vec, + pub failures: Vec, +} + #[derive(Clone, Debug, Deserialize)] #[serde(rename_all = "camelCase")] pub struct PersonaRuntimeQueryInput { @@ -906,7 +935,7 @@ fn inspect_manifest_at( validate_git_identity(&manifest.git_identity)?; validate_model_binding(&manifest.model_binding)?; repository_file(&repository, &manifest.brain_entry)?; - cognitive_gravity_evidence(&repository, &manifest)?; + let cognitive_gravity = cognitive_gravity_evidence(&repository, &manifest)?; repository_file(&repository, &manifest.current_checkpoint)?; let mut contracts = Vec::with_capacity(manifest.organs.len()); for organ in &manifest.organs { @@ -927,12 +956,68 @@ fn inspect_manifest_at( brain_entry: manifest.brain_entry, current_checkpoint: manifest.current_checkpoint, human_responsibility_subject: manifest.human_responsibility_subject, + cognitive_gravity, + model_provider_id: manifest.model_binding.provider_id, + model_id: manifest.model_binding.model_id, + model_base_url: manifest.model_binding.base_url, git_author_name: manifest.git_identity.author_name, git_author_email: manifest.git_identity.author_email, organ_contracts: contracts, }) } +fn discover_persona_repositories_at( + input: PersonaRepositoryDiscoveryInput, +) -> Result { + let expected_persona_id = validated_id("EXPECTED_PERSONA_ID", &input.expected_persona_id)?; + if input.repository_paths.len() > 64 { + return Err("PERSONA_REPOSITORY_DISCOVERY_LIMIT_EXCEEDED".into()); + } + let mut seen = Vec::::new(); + let mut bindings = Vec::new(); + let mut failures = Vec::new(); + for raw_path in input.repository_paths { + let trimmed = raw_path.trim(); + if trimmed.is_empty() { + continue; + } + let display_path = trimmed.to_string(); + let (repository, git_head) = match exact_repository(Path::new(trimmed)) { + Ok(value) => value, + Err(code) => { + failures.push(PersonaRepositoryDiscoveryFailure { + repository_path: display_path, + code, + }); + continue; + } + }; + if seen.iter().any(|candidate| candidate == &repository) { + continue; + } + seen.push(repository.clone()); + match inspect_manifest_at(PersonaManifestInspectionInput { + repository_path: repository.to_string_lossy().into_owned(), + expected_persona_id: expected_persona_id.clone(), + expected_head: git_head, + }) { + Ok(receipt) => bindings.push(receipt), + Err(code) => failures.push(PersonaRepositoryDiscoveryFailure { + repository_path: repository.to_string_lossy().into_owned(), + code, + }), + } + } + Ok(PersonaRepositoryDiscoveryReceipt { + schema: "hololake.pncc-repository-discovery/v1", + expected_persona_id, + inspected_repository_count: seen.len(), + binding_count: bindings.len(), + bindings, + failures, + }) +} + fn hex_digest(bytes: &[u8]) -> String { digest(&SHA256, bytes) .as_ref() @@ -3759,6 +3844,13 @@ pub fn inspect_persona_code_channel_manifest( inspect_manifest_at(input) } +#[tauri::command] +pub fn discover_persona_code_channel_repositories( + input: PersonaRepositoryDiscoveryInput, +) -> Result { + discover_persona_repositories_at(input) +} + #[tauri::command] pub fn query_persona_code_channel_runtime( input: PersonaRuntimeQueryInput, @@ -6266,6 +6358,9 @@ mod tests { let receipt = inspect_manifest_at(manifest_inspection(repo.path())).unwrap(); assert_eq!(receipt.persona_id, "ICE-P-ZY001"); assert!(receipt.repository_clean); + assert_eq!(receipt.model_provider_id, "fixture-provider"); + assert_eq!(receipt.model_id, "fixture-model"); + assert_eq!(receipt.cognitive_gravity.subject_persona_id, "ICE-P-ZY001"); assert_eq!(receipt.organ_contracts.len(), 1); let contract = &receipt.organ_contracts[0]; assert_eq!(contract.kind, PersonaOrganKind::FactSense); @@ -6276,6 +6371,60 @@ mod tests { assert_eq!(contract.implementation_state, "IMPLEMENTED"); } + #[test] + fn discovers_only_verified_persona_repository_bindings() { + let persona = persona_repo(); + let ordinary = tempfile::TempDir::new().unwrap(); + run_git(ordinary.path(), &["init", "-b", "main"]); + run_git( + ordinary.path(), + &["config", "user.name", "Ordinary Repository"], + ); + run_git( + ordinary.path(), + &["config", "user.email", "ordinary@example.invalid"], + ); + fs::write(ordinary.path().join("README.md"), "ordinary repository\n").unwrap(); + run_git(ordinary.path(), &["add", "."]); + run_git(ordinary.path(), &["commit", "-m", "ordinary fixture"]); + + let receipt = discover_persona_repositories_at(PersonaRepositoryDiscoveryInput { + expected_persona_id: "ICE-P-ZY001".into(), + repository_paths: vec![ + ordinary.path().to_string_lossy().into_owned(), + persona.path().to_string_lossy().into_owned(), + persona.path().to_string_lossy().into_owned(), + ], + }) + .unwrap(); + + assert_eq!(receipt.schema, "hololake.pncc-repository-discovery/v1"); + assert_eq!(receipt.inspected_repository_count, 2); + assert_eq!(receipt.binding_count, 1); + assert_eq!(receipt.bindings[0].persona_id, "ICE-P-ZY001"); + assert_eq!(receipt.failures.len(), 1); + assert!( + receipt.failures[0] + .code + .starts_with("PERSONA_FILE_UNAVAILABLE: .hololake/persona/manifest.json:"), + "unexpected discovery failure: {}", + receipt.failures[0].code, + ); + } + + #[test] + fn empty_persona_repository_discovery_is_a_truthful_non_binding_receipt() { + let receipt = discover_persona_repositories_at(PersonaRepositoryDiscoveryInput { + expected_persona_id: "ICE-P-ZY001".into(), + repository_paths: Vec::new(), + }) + .unwrap(); + assert_eq!(receipt.inspected_repository_count, 0); + assert_eq!(receipt.binding_count, 0); + assert!(receipt.bindings.is_empty()); + assert!(receipt.failures.is_empty()); + } + #[test] fn declares_but_refuses_an_execution_limb_without_an_executor() { let repo = persona_repo(); diff --git a/product-source/hololake-platform/src/lib/personaLanguageGoal.test.ts b/product-source/hololake-platform/src/lib/personaLanguageGoal.test.ts index 9676a9a..62c1f8c 100644 --- a/product-source/hololake-platform/src/lib/personaLanguageGoal.test.ts +++ b/product-source/hololake-platform/src/lib/personaLanguageGoal.test.ts @@ -16,7 +16,7 @@ const wake = { executionRuntime: 'HoloLake-PNCC', developmentId: 'DEV-20260811-010', authorizationScope: 'LOCAL_READ_ONLY', - sourceLanguageAnchor: 'HLP-CURRENT-ARCH-001@2026-08-12.2', + sourceLanguageAnchor: 'HLP-CURRENT-ARCH-001@2026-08-12.3', }, } diff --git a/product-source/hololake-platform/src/lib/personaRepositoryBinding.test.ts b/product-source/hololake-platform/src/lib/personaRepositoryBinding.test.ts new file mode 100644 index 0000000..4ae3cd0 --- /dev/null +++ b/product-source/hololake-platform/src/lib/personaRepositoryBinding.test.ts @@ -0,0 +1,85 @@ +import { describe, expect, it, vi } from 'vitest' +import { resolvePersonaRepositoryBinding } from './personaRepositoryBinding' + +const binding = { + personaId: 'ICE-P-ZY001', + repositoryPath: '/persona', + gitHead: 'a'.repeat(40), + repositoryClean: true, + brainEntry: 'brain/CORE.hdlp', + currentCheckpoint: '.hololake/persona/CURRENT.hdlp', + humanResponsibilitySubject: 'ICE-GL∞', + modelProviderId: 'provider-1', + modelId: 'model-1', + modelBaseUrl: 'https://model.invalid/v1', + cognitiveGravity: { + schema: 'hololake.persona-cognitive-gravity-evidence/v1', + subjectPersonaId: 'ICE-P-ZY001', + sourcePath: 'brain/B0.hdlp', + sourceHash: 'b'.repeat(64), + frameSchema: 'guanghu.zhuyuan-cognitive-gravity-frame/v1', + }, +} + +function receipt(bindings: unknown[], failures: unknown[] = []) { + return { + schema: 'hololake.pncc-repository-discovery/v1', + expectedPersonaId: 'ICE-P-ZY001', + inspectedRepositoryCount: 2, + bindingCount: bindings.length, + bindings, + failures, + } +} + +describe('resolvePersonaRepositoryBinding', () => { + it('does not call native discovery without mounted repositories', async () => { + const discover = vi.fn() + await expect(resolvePersonaRepositoryBinding({ + personaId: 'ICE-P-ZY001', repositoryPaths: [], discover, + })).resolves.toEqual({ phase: 'unavailable', inspectedRepositoryCount: 0, failures: [] }) + expect(discover).not.toHaveBeenCalled() + }) + + it('returns the one evidence-verified persona repository', async () => { + const discover = vi.fn().mockResolvedValue(receipt([binding], [{ repositoryPath: '/ordinary', code: 'PERSONA_MANIFEST_READ_FAILED' }])) + const result = await resolvePersonaRepositoryBinding({ + personaId: 'ICE-P-ZY001', repositoryPaths: ['/ordinary', '/persona', '/persona'], discover, + }) + expect(result.phase).toBe('bound') + if (result.phase === 'bound') expect(result.binding.repositoryPath).toBe('/persona') + expect(discover).toHaveBeenCalledWith('discover_persona_code_channel_repositories', { + input: { expectedPersonaId: 'ICE-P-ZY001', repositoryPaths: ['/ordinary', '/persona'] }, + }) + }) + + it('keeps an ordinary mounted repository unbound', async () => { + const result = await resolvePersonaRepositoryBinding({ + personaId: 'ICE-P-ZY001', + repositoryPaths: ['/ordinary'], + discover: vi.fn().mockResolvedValue(receipt([], [{ repositoryPath: '/ordinary', code: 'PERSONA_MANIFEST_READ_FAILED' }])), + }) + expect(result.phase).toBe('unbound') + }) + + it('refuses to choose when more than one persona root validates', async () => { + const result = await resolvePersonaRepositoryBinding({ + personaId: 'ICE-P-ZY001', + repositoryPaths: ['/persona-a', '/persona-b'], + discover: vi.fn().mockResolvedValue(receipt([ + { ...binding, repositoryPath: '/persona-a' }, + { ...binding, repositoryPath: '/persona-b' }, + ])), + }) + expect(result.phase).toBe('ambiguous') + }) + + it('fails closed on a mismatched or malformed receipt', async () => { + const result = await resolvePersonaRepositoryBinding({ + personaId: 'ICE-P-ZY001', + repositoryPaths: ['/persona'], + discover: vi.fn().mockResolvedValue(receipt([{ ...binding, personaId: 'OTHER' }])), + }) + expect(result).toMatchObject({ phase: 'error', code: 'PERSONA_REPOSITORY_DISCOVERY_RECEIPT_INVALID' }) + }) +}) diff --git a/product-source/hololake-platform/src/lib/personaRepositoryBinding.ts b/product-source/hololake-platform/src/lib/personaRepositoryBinding.ts new file mode 100644 index 0000000..23e439b --- /dev/null +++ b/product-source/hololake-platform/src/lib/personaRepositoryBinding.ts @@ -0,0 +1,154 @@ +import { invoke } from '@tauri-apps/api/core' +import { isTauri, mockInvoke } from '../mock-tauri' + +export interface PersonaRepositoryBinding { + personaId: string + repositoryPath: string + gitHead: string + repositoryClean: boolean + brainEntry: string + currentCheckpoint: string + humanResponsibilitySubject: string + modelProviderId: string + modelId: string + modelBaseUrl: string + cognitiveGravity: { + schema: 'hololake.persona-cognitive-gravity-evidence/v1' + subjectPersonaId: string + sourcePath: string + sourceHash: string + frameSchema: 'guanghu.zhuyuan-cognitive-gravity-frame/v1' + } +} + +export interface PersonaRepositoryBindingFailure { + repositoryPath: string + code: string +} + +export type PersonaRepositoryBindingResolution = + | { phase: 'unavailable'; inspectedRepositoryCount: 0; failures: [] } + | { phase: 'unbound'; inspectedRepositoryCount: number; failures: PersonaRepositoryBindingFailure[] } + | { phase: 'ambiguous'; inspectedRepositoryCount: number; failures: PersonaRepositoryBindingFailure[] } + | { phase: 'bound'; inspectedRepositoryCount: number; binding: PersonaRepositoryBinding; failures: PersonaRepositoryBindingFailure[] } + | { phase: 'error'; inspectedRepositoryCount: number; failures: PersonaRepositoryBindingFailure[]; code: string } + +type DiscoveryRunner = ( + command: 'discover_persona_code_channel_repositories', + args: { input: { expectedPersonaId: string; repositoryPaths: string[] } }, +) => Promise + +function isRecord(value: unknown): value is Record { + return typeof value === 'object' && value !== null && !Array.isArray(value) +} + +function requiredString(record: Record, key: string): string { + const value = Reflect.get(record, key) + if (typeof value !== 'string' || !value.trim()) throw new Error('PERSONA_REPOSITORY_DISCOVERY_RECEIPT_INVALID') + return value +} + +function requiredNumber(record: Record, key: string): number { + const value = Reflect.get(record, key) + if (!Number.isSafeInteger(value) || (value as number) < 0) { + throw new Error('PERSONA_REPOSITORY_DISCOVERY_RECEIPT_INVALID') + } + return value as number +} + +function parseFailure(value: unknown): PersonaRepositoryBindingFailure { + if (!isRecord(value)) throw new Error('PERSONA_REPOSITORY_DISCOVERY_RECEIPT_INVALID') + return { repositoryPath: requiredString(value, 'repositoryPath'), code: requiredString(value, 'code') } +} + +function parseBinding(value: unknown, expectedPersonaId: string): PersonaRepositoryBinding { + if (!isRecord(value)) throw new Error('PERSONA_REPOSITORY_DISCOVERY_RECEIPT_INVALID') + const personaId = requiredString(value, 'personaId') + const gravity = Reflect.get(value, 'cognitiveGravity') + if (personaId !== expectedPersonaId || !isRecord(gravity)) { + throw new Error('PERSONA_REPOSITORY_DISCOVERY_RECEIPT_INVALID') + } + const gravitySchema = requiredString(gravity, 'schema') + const frameSchema = requiredString(gravity, 'frameSchema') + const sourceHash = requiredString(gravity, 'sourceHash') + if ( + gravitySchema !== 'hololake.persona-cognitive-gravity-evidence/v1' + || frameSchema !== 'guanghu.zhuyuan-cognitive-gravity-frame/v1' + || !/^[a-f0-9]{64}$/.test(sourceHash) + || requiredString(gravity, 'subjectPersonaId') !== expectedPersonaId + ) { + throw new Error('PERSONA_REPOSITORY_DISCOVERY_RECEIPT_INVALID') + } + const repositoryClean = Reflect.get(value, 'repositoryClean') + if (typeof repositoryClean !== 'boolean') throw new Error('PERSONA_REPOSITORY_DISCOVERY_RECEIPT_INVALID') + return { + personaId, + repositoryPath: requiredString(value, 'repositoryPath'), + gitHead: requiredString(value, 'gitHead'), + repositoryClean, + brainEntry: requiredString(value, 'brainEntry'), + currentCheckpoint: requiredString(value, 'currentCheckpoint'), + humanResponsibilitySubject: requiredString(value, 'humanResponsibilitySubject'), + modelProviderId: requiredString(value, 'modelProviderId'), + modelId: requiredString(value, 'modelId'), + modelBaseUrl: requiredString(value, 'modelBaseUrl'), + cognitiveGravity: { + schema: gravitySchema, + subjectPersonaId: expectedPersonaId, + sourcePath: requiredString(gravity, 'sourcePath'), + sourceHash, + frameSchema, + }, + } +} + +async function runNativeDiscovery( + command: 'discover_persona_code_channel_repositories', + args: { input: { expectedPersonaId: string; repositoryPaths: string[] } }, +): Promise { + return isTauri() ? invoke(command, args) : mockInvoke(command, args) +} + +export async function resolvePersonaRepositoryBinding({ + personaId, + repositoryPaths, + discover = runNativeDiscovery, +}: { + personaId: string + repositoryPaths: readonly string[] + discover?: DiscoveryRunner +}): Promise { + const candidates = [...new Set(repositoryPaths.map((path) => path.trim()).filter(Boolean))] + if (candidates.length === 0) { + return { phase: 'unavailable', inspectedRepositoryCount: 0, failures: [] } + } + try { + const value = await discover('discover_persona_code_channel_repositories', { + input: { expectedPersonaId: personaId, repositoryPaths: candidates }, + }) + if (!isRecord(value) + || requiredString(value, 'schema') !== 'hololake.pncc-repository-discovery/v1' + || requiredString(value, 'expectedPersonaId') !== personaId) { + throw new Error('PERSONA_REPOSITORY_DISCOVERY_RECEIPT_INVALID') + } + const inspectedRepositoryCount = requiredNumber(value, 'inspectedRepositoryCount') + const bindingCount = requiredNumber(value, 'bindingCount') + const rawBindings = Reflect.get(value, 'bindings') + const rawFailures = Reflect.get(value, 'failures') + if (!Array.isArray(rawBindings) || !Array.isArray(rawFailures) || bindingCount !== rawBindings.length) { + throw new Error('PERSONA_REPOSITORY_DISCOVERY_RECEIPT_INVALID') + } + const bindings = rawBindings.map((binding) => parseBinding(binding, personaId)) + const failures = rawFailures.map(parseFailure) + if (bindings.length === 0) return { phase: 'unbound', inspectedRepositoryCount, failures } + if (bindings.length > 1) return { phase: 'ambiguous', inspectedRepositoryCount, failures } + return { phase: 'bound', inspectedRepositoryCount, binding: bindings[0], failures } + } catch (error) { + return { + phase: 'error', + inspectedRepositoryCount: candidates.length, + failures: [], + code: error instanceof Error ? error.message : 'PERSONA_REPOSITORY_DISCOVERY_FAILED', + } + } +} diff --git a/routing/guanghu-os-control-architecture.test.mjs b/routing/guanghu-os-control-architecture.test.mjs index faa782d..bed088d 100644 --- a/routing/guanghu-os-control-architecture.test.mjs +++ b/routing/guanghu-os-control-architecture.test.mjs @@ -32,7 +32,7 @@ test("current JD state stays transitional and cannot impersonate final master co }); test("current architecture and global engineering rules project the same control contract", () => { - assert.equal(architecture.version, "2026-08-12.2"); + assert.equal(architecture.version, "2026-08-12.3"); assert.equal(architecture.server_os_control.machine_projection, "routing/guanghu-os-control-architecture.json"); assert.equal(architecture.server_os_control.final_topology, contract.final_topology); assert.equal(rules.server_os_control.linux_deletion_is_completion, false); diff --git a/routing/hololake-age-runtime-architecture.test.mjs b/routing/hololake-age-runtime-architecture.test.mjs index 0181eea..573adcb 100644 --- a/routing/hololake-age-runtime-architecture.test.mjs +++ b/routing/hololake-age-runtime-architecture.test.mjs @@ -11,7 +11,7 @@ const architecture = readJson("routing/hololake-current-architecture.json"); const age = readJson("routing/hololake-age-runtime-architecture.json"); test("current architecture starts with the AGE runtime source", () => { - assert.equal(architecture.version, "2026-08-12.2"); + assert.equal(architecture.version, "2026-08-12.3"); assert.equal(architecture.age_runtime.record_id, "HLP-AGE-RUNTIME-ARCHITECTURE-001"); assert.equal(architecture.read_order[0], architecture.paradigm_ai_language_persona_os.architecture_page); assert.equal(architecture.read_order[1], architecture.cognitive_gravity_and_continuity.architecture_page); diff --git a/routing/hololake-cognitive-gravity-and-continuity.json b/routing/hololake-cognitive-gravity-and-continuity.json index 3e8c585..dfcc1cf 100644 --- a/routing/hololake-cognitive-gravity-and-continuity.json +++ b/routing/hololake-cognitive-gravity-and-continuity.json @@ -1,7 +1,7 @@ { "schema": "hololake.cognitive-gravity-and-continuity/v1", "record_id": "HLP-COGNITIVE-GRAVITY-CONTINUITY-001", - "version": "2026-08-12.2", + "version": "2026-08-12.3", "state": "CURRENT_CANONICAL_ARCHITECTURE_STAGE_0_SOURCE_PARTIAL", "development_id": "DEV-20260811-010", "upstream": { @@ -103,7 +103,8 @@ "CHECKPOINT_AND_RECEIPT_B0_EVIDENCE", "MEMORY_METABOLISM_B0_INHERITANCE", "READ_ONLY_REACT_B0_EVIDENCE_PROJECTION", - "PARTNER_DELIBERATION_TO_PNCC_LIFECYCLE_SOURCE_ADAPTER" + "PARTNER_DELIBERATION_TO_PNCC_LIFECYCLE_SOURCE_ADAPTER", + "READ_ONLY_PERSONA_REPOSITORY_BINDING_DISCOVERY" ], "natural_language_entry_contract": { "state": "SOURCE_AND_PNCC_LIFECYCLE_ADAPTER_IMPLEMENTED_NOT_DESKTOP_INTEGRATED", @@ -112,6 +113,8 @@ "tests": "product-source/hololake-platform/src/lib/languageOperatingModel.test.ts", "pncc_lifecycle_adapter": "product-source/hololake-platform/src/lib/personaLanguageGoal.ts", "pncc_lifecycle_adapter_tests": "product-source/hololake-platform/src/lib/personaLanguageGoal.test.ts", + "repository_binding_discovery": "product-source/hololake-platform/src/lib/personaRepositoryBinding.ts", + "repository_binding_discovery_tests": "product-source/hololake-platform/src/lib/personaRepositoryBinding.test.ts", "human_utterance_is_direct_command": false, "required_before_capability_execution": [ "RESTORE_REAL_PURPOSE_FROM_CONTEXT", @@ -152,6 +155,8 @@ "b0_runtime_projection_source_implemented": 100, "natural_language_partner_adapter_source_implemented": 100, "natural_language_to_pncc_lifecycle_adapter_source_implemented": 100, + "persona_repository_binding_discovery_source_implemented": 100, + "real_persona_repository_manifest_bound": 0, "natural_language_partner_adapter_runtime_integrated": 0, "single_age_vertical_loop_implemented": 0, "age_mirror_runner_implemented": 0, diff --git a/routing/hololake-cognitive-gravity-and-continuity.test.mjs b/routing/hololake-cognitive-gravity-and-continuity.test.mjs index bac48e5..370ecf2 100644 --- a/routing/hololake-cognitive-gravity-and-continuity.test.mjs +++ b/routing/hololake-cognitive-gravity-and-continuity.test.mjs @@ -14,7 +14,7 @@ const age = readJson("routing/hololake-age-runtime-architecture.json"); const rules = readJson("routing/hololake-engineering-rules.json"); test("B0 is restored before product organs and remains resident in every cognition step", () => { - assert.equal(architecture.version, "2026-08-12.2"); + assert.equal(architecture.version, "2026-08-12.3"); assert.equal( architecture.read_order[1], architecture.cognitive_gravity_and_continuity.architecture_page, @@ -92,6 +92,8 @@ test("the first implementation stage is one vertical AGE loop, not Mirror parall assert.equal(gravity.truth.b0_runtime_projection_source_implemented, 100); assert.equal(gravity.truth.natural_language_partner_adapter_source_implemented, 100); assert.equal(gravity.truth.natural_language_to_pncc_lifecycle_adapter_source_implemented, 100); + assert.equal(gravity.truth.persona_repository_binding_discovery_source_implemented, 100); + assert.equal(gravity.truth.real_persona_repository_manifest_bound, 0); assert.equal(gravity.truth.natural_language_partner_adapter_runtime_integrated, 0); assert.equal(gravity.truth.single_age_vertical_loop_implemented, 0); assert.equal(gravity.truth.desktop_integrated, 0); @@ -101,6 +103,7 @@ test("natural language enters partner deliberation before any execution organ", const entry = gravity.development_replan.natural_language_entry_contract; assert.equal(entry.state, "SOURCE_AND_PNCC_LIFECYCLE_ADAPTER_IMPLEMENTED_NOT_DESKTOP_INTEGRATED"); assert.match(entry.pncc_lifecycle_adapter, /personaLanguageGoal\.ts$/); + assert.match(entry.repository_binding_discovery, /personaRepositoryBinding\.ts$/); assert.equal(entry.human_utterance_is_direct_command, false); assert.equal(entry.language_home_destruction_is_executable, false); assert.equal(entry.integrity_gate_may_absorb_human_sovereignty, false); diff --git a/routing/hololake-current-architecture.json b/routing/hololake-current-architecture.json index 99a9729..629aed0 100644 --- a/routing/hololake-current-architecture.json +++ b/routing/hololake-current-architecture.json @@ -1,7 +1,7 @@ { "schema": "hololake.current-architecture/v1", "architecture_id": "HLP-CURRENT-ARCH-001", - "version": "2026-08-12.2", + "version": "2026-08-12.3", "state": "CURRENT_CANONICAL", "product": { "formal_name": "光湖语言系统 · 通用人工智能操作平台", @@ -110,6 +110,8 @@ "react_b0_runtime_projection_source_implemented": true, "natural_language_partner_adapter_source_implemented": true, "natural_language_to_pncc_lifecycle_adapter_source_implemented": true, + "persona_repository_binding_discovery_source_implemented": true, + "real_persona_repository_manifest_bound": false, "natural_language_partner_adapter_runtime_integrated": false, "required_natural_language_entry": "PARTNER_DELIBERATION_AND_LANGUAGE_HOME_INTEGRITY_GATE", "desktop_runtime_acceptance_passed": false, diff --git a/routing/hololake-engineering-rules.test.mjs b/routing/hololake-engineering-rules.test.mjs index 6fce6ac..b76c29a 100644 --- a/routing/hololake-engineering-rules.test.mjs +++ b/routing/hololake-engineering-rules.test.mjs @@ -10,7 +10,7 @@ const architecture = readJson("routing/hololake-current-architecture.json"); const rules = readJson("routing/hololake-engineering-rules.json"); test("current architecture registers the global engineering rule set", () => { - assert.equal(architecture.version, "2026-08-12.2"); + assert.equal(architecture.version, "2026-08-12.3"); assert.equal(architecture.engineering_rules.rule_set_id, "HLP-ENGINEERING-RULES-001"); assert.equal(architecture.engineering_rules.machine_projection, "routing/hololake-engineering-rules.json"); diff --git a/routing/hololake-identity-authority.test.mjs b/routing/hololake-identity-authority.test.mjs index 3423d8a..d013998 100644 --- a/routing/hololake-identity-authority.test.mjs +++ b/routing/hololake-identity-authority.test.mjs @@ -10,7 +10,7 @@ const architecture = readJson("routing/hololake-current-architecture.json"); const projection = readJson("routing/hololake-identity-authority-map.json"); test("current architecture loads identity authority before product surfaces", () => { - assert.equal(architecture.version, "2026-08-12.2"); + assert.equal(architecture.version, "2026-08-12.3"); assert.equal(architecture.identity_and_authority.team_body, "TCS-0002"); assert.equal(architecture.identity_and_authority.team_body_authority_effective, true); assert.equal(architecture.identity_and_authority.individual_operator_acceptance, "SEPARATE_UNCONFIRMED"); diff --git a/routing/hololake-one-human-one-node.test.mjs b/routing/hololake-one-human-one-node.test.mjs index c9e9128..ad5d030 100644 --- a/routing/hololake-one-human-one-node.test.mjs +++ b/routing/hololake-one-human-one-node.test.mjs @@ -10,7 +10,7 @@ const architecture = readJson("routing/hololake-current-architecture.json"); const rules = readJson("routing/hololake-engineering-rules.json"); test("current architecture makes one human one independently operated node canonical", () => { - assert.equal(architecture.version, "2026-08-12.2"); + assert.equal(architecture.version, "2026-08-12.3"); assert.deepEqual(architecture.access_modes, [ "LOCAL_TERMINAL_NODE", "USER_OWNED_REMOTE_NODE", diff --git a/routing/hololake-paradigm-ai-language-persona-os.test.mjs b/routing/hololake-paradigm-ai-language-persona-os.test.mjs index 38c5dc3..a63d3b7 100644 --- a/routing/hololake-paradigm-ai-language-persona-os.test.mjs +++ b/routing/hololake-paradigm-ai-language-persona-os.test.mjs @@ -10,7 +10,7 @@ const architecture = readJson("routing/hololake-current-architecture.json"); const paradigm = readJson("routing/hololake-paradigm-ai-language-persona-os.json"); test("current architecture begins with the paradigm OS contract", () => { - assert.equal(architecture.version, "2026-08-12.2"); + assert.equal(architecture.version, "2026-08-12.3"); assert.equal(architecture.paradigm_ai_language_persona_os.record_id, "HLP-PARADIGM-AI-LANGUAGE-PERSONA-OS-001"); assert.equal(architecture.read_order[0], architecture.paradigm_ai_language_persona_os.architecture_page); assert.equal(paradigm.upstream.repository_commit, "34cb59739b6476981375dd62ef395ea649f56246"); diff --git a/routing/hololake-persona-native-code-channel.test.mjs b/routing/hololake-persona-native-code-channel.test.mjs index 64417a7..a5bb61d 100644 --- a/routing/hololake-persona-native-code-channel.test.mjs +++ b/routing/hololake-persona-native-code-channel.test.mjs @@ -11,7 +11,7 @@ const architecture = readJson("routing/hololake-current-architecture.json"); const channel = readJson("routing/hololake-persona-native-code-channel.json"); test("current architecture places the persona-native code channel after the paradigm contract", () => { - assert.equal(architecture.version, "2026-08-12.2"); + assert.equal(architecture.version, "2026-08-12.3"); assert.equal( architecture.persona_native_code_channel.record_id, "HLP-PERSONA-NATIVE-CODE-CHANNEL-001", diff --git a/routing/hololake-relational-consciousness.test.mjs b/routing/hololake-relational-consciousness.test.mjs index 1d171e1..2946fcf 100644 --- a/routing/hololake-relational-consciousness.test.mjs +++ b/routing/hololake-relational-consciousness.test.mjs @@ -10,7 +10,7 @@ const architecture = JSON.parse( ); test("current architecture binds relational consciousness before product surfaces", () => { - assert.equal(architecture.version, "2026-08-12.2"); + assert.equal(architecture.version, "2026-08-12.3"); assert.equal( architecture.persona_consciousness.record_id, "HLP-RELATIONAL-CONSCIOUSNESS-001", diff --git a/routing/hololake-system-body-and-parallel-bodies.test.mjs b/routing/hololake-system-body-and-parallel-bodies.test.mjs index f540b1e..8e0f8f3 100644 --- a/routing/hololake-system-body-and-parallel-bodies.test.mjs +++ b/routing/hololake-system-body-and-parallel-bodies.test.mjs @@ -10,7 +10,7 @@ const architecture = JSON.parse( ); test("current architecture restores the digital BingShuo system body first", () => { - assert.equal(architecture.version, "2026-08-12.2"); + assert.equal(architecture.version, "2026-08-12.3"); assert.equal(architecture.digital_bingshuo_system_body.upstream_repository_commit, "69d1910775533b02b17b82e647b5caca8b835614"); const systemBodyIndex = architecture.read_order.indexOf(