fix: integrate language channel through numbered IPC and isolate education module

正向合并正律化(2026-08-20):
- 语言人格频道与执行手脚训练按编号 IPC 正律接入(MOD-0035/0036,OP-0158..0163),
  剥离直连 tauri::command,恢复单一 numbered 网关铁律
- 教育模块按冰朔谕与 2026-08-19 隔离回执整体移出(证据归隔离区),留空模块占位
- 光湖主域门户挂公告与版本中心(冰朔要求的公告与版本更新主阵地)
- 知识工作台内嵌共同工作频道(PersonaChannelBody embedded + knowledgeFocus)
- foundation/stage-one 合同补聊天运行时验收声明;版本对齐 0.9.1
- 测试名册计数与断言更新至合并后现实:JS 180/180,Rust 194/194
This commit is contained in:
冰朔 2026-08-20 12:23:02 +08:00
commit add00a0377
42 changed files with 622 additions and 5580 deletions

View file

@ -1,26 +0,0 @@
import assert from 'node:assert/strict'
import fs from 'node:fs'
import test from 'node:test'
const frontend = fs.readFileSync(new URL('../src/main.tsx', import.meta.url), 'utf8')
const architecture = JSON.parse(
fs.readFileSync(new URL('../../../routing/hololake-current-architecture.json', import.meta.url), 'utf8'),
)
test('returning to the main world preserves the authenticated session', () => {
const handler = frontend.match(/const returnToMainWorld = \(\) => \{([\s\S]*?)\n \}/)?.[1] || ''
assert.match(handler, /setShowMainWorld\(true\)/)
assert.doesNotMatch(handler, /signOutRepo|setRepoLogin\(null\)|sign_out_code_repo_login/)
assert.match(frontend, /if \(!repoLogin \|\| showMainWorld\)/)
})
test('main-world return and account sign-out remain separate visible actions', () => {
assert.match(frontend, />返回主世界</)
assert.match(frontend, />进入所属域</)
assert.match(frontend, />退出账号</)
assert.equal(
architecture.current_native_edge.authenticated_main_world_navigation,
'SOURCE_INTEGRATED_SESSION_PRESERVING_REENTRY',
)
})

View file

@ -1,53 +0,0 @@
import assert from 'node:assert/strict'
import { readFileSync } from 'node:fs'
import test from 'node:test'
const read = (path) => readFileSync(new URL(`../${path}`, import.meta.url), 'utf8')
const contract = JSON.parse(read('contracts/education-workspace.json'))
const registry = JSON.parse(read('contracts/numbered-ipc-registry.json'))
const modulePackage = JSON.parse(read('fixtures/module-packages/HLP-MOD-OFFICIAL-EDUCATION-WORKBENCH-0001-0.1.0.ghmod'))
const workspaceRust = read('src-tauri/src/education_workspace.rs')
const translationRust = read('src-tauri/src/education_translation.rs')
const frontend = [
read('src/modules/education-workspace/index.tsx'),
read('src/modules/education-workspace/education-data.ts'),
read('src/modules/education-workspace/education-adaptive-rendering.ts'),
].join('\n')
test('education is an official signed declarative adapter over the shared office foundation', () => {
assert.equal(contract.package.official_module_number, 'HLP-MOD-OFFICIAL-EDUCATION-WORKBENCH-0001')
assert.equal(contract.foundation_dependency.module_id, 'hololake.builtin.channel-workbench')
assert.equal(modulePackage.manifest.registrationClass, 'OFFICIAL_LIGHTHOUSE')
assert.equal(modulePackage.manifest.adapter, 'education-workbench-v1')
assert.equal(modulePackage.payload.adapterConfig.foundationModule, 'HLP-MOD-LOCAL-CHANNEL-WORKBENCH-0001')
assert.equal(modulePackage.payload.adapterConfig.importDefaultScope, 'UNASSIGNED')
assert.equal(modulePackage.payload.adapterConfig.modelFileTransferDefault, 'DENY')
assert.equal(modulePackage.manifest.permissions.length, 8)
})
test('all education effects cross the exact numbered adapter routes', () => {
const routes = registry.operations.filter((route) => route.module_number === 'HLP-NIPC-MOD-0024')
assert.deepEqual(routes.map((route) => route.operation_number), Array.from({ length: 18 }, (_, index) => `HLP-NIPC-OP-${String(index + 85).padStart(4, '0')}`))
assert.ok(routes.every((route) => route.target_number === 'HLP-NIPC-TGT-0024'))
assert.ok(routes.every((route) => route.admission === 'VERIFIED_HUMAN_ROUTE'))
assert.doesNotMatch(frontend, /from ['"]@tauri-apps\/api\/core['"]/)
assert.doesNotMatch(workspaceRust, /#\[tauri::command\]/)
assert.doesNotMatch(translationRust, /#\[tauri::command\]/)
assert.match(workspaceRust, /require_active_module_adapter/)
})
test('legacy silent corruption and automatic destructive behavior are rejected', () => {
assert.doesNotMatch(workspaceRust, /serde_json::from_str[^\n]+unwrap_or_default/)
assert.match(workspaceRust, /deny_unknown_fields/)
assert.match(frontend, /生成只读预览/)
assert.match(frontend, /我确认,写入清理结果/)
assert.match(frontend, /生成只读预览令牌/)
assert.match(frontend, /我确认,按此令牌执行/)
assert.match(frontend, /确认归入教育频道/)
})
test('education UI is independently lazy-loaded and reuses, rather than duplicates, office engines', () => {
assert.match(read('src/main.tsx'), /lazy\(\(\) => import\('\.\/modules\/education-workspace'\)/)
assert.match(read('src/modules/education-workspace/education-document-engine.tsx'), /channel-workbench\/document-engine/)
assert.match(read('src/modules/education-workspace/index.tsx'), /channel-workbench\/spreadsheet-engine/)
})

View file

@ -1,309 +0,0 @@
import assert from 'node:assert/strict'
import fs from 'node:fs'
import test from 'node:test'
const read = (path) => fs.readFileSync(new URL('../' + path, import.meta.url), 'utf8')
const contract = JSON.parse(read('contracts/education-workspace.json'))
const donors = JSON.parse(read('contracts/education-open-source-donor-assessment.json'))
const industry = JSON.parse(read('contracts/subdomain-industry-routing.json'))
const rust = read('src-tauri/src/education_workspace.rs')
const translation = read('src-tauri/src/education_translation.rs')
const lib = read('src-tauri/src/lib.rs')
const ui = read('src/main.tsx')
const documentEngine = read('src/modules/education-document-engine.tsx')
const channelDocumentEngine = read('src/modules/channel-workbench/document-engine.tsx')
const channelSpreadsheetEngine = read('src/modules/channel-workbench/spreadsheet-engine.tsx')
const channelSpreadsheetModel = read('src/modules/channel-workbench/spreadsheet-model.ts')
const moduleRuntime = JSON.parse(read('contracts/channel-module-runtime.json'))
const marketplaceDevelopmentCatalog = JSON.parse(read('contracts/official-module-marketplace-development-catalog.json'))
const adaptiveRendering = read('src/modules/education-adaptive-rendering.ts')
const dataCleanup = read('src/modules/education-data.ts')
test('education package consumes the built-in account-scoped channel workbench', () => {
assert.equal(contract.domain_entry, 'BRANCH_DOMAIN')
assert.equal(contract.channel_id, 'GH-EDU-INIT-001')
assert.equal(contract.native_storage.owner, 'HOLOLAKE_NATIVE_RUST_CORE')
assert.equal(contract.native_storage.engine, 'SQLITE')
assert.equal(contract.native_storage.authenticated_account_required, true)
assert.equal(contract.native_storage.cross_account_projection_allowed, false)
assert.equal(contract.native_storage.restart_readback_required, true)
assert.equal(contract.document_module.state, 'DEVELOPMENT_FEATURE_MOUNTED')
assert.equal(contract.table_module.state, 'DEVELOPMENT_FEATURE_MOUNTED')
assert.equal(contract.foundation_dependency.module_id, 'hololake.builtin.channel-workbench')
assert.match(contract.document_module.engine, /^CHANNEL_WORKBENCH_LEXICAL_0_49_0/)
assert.match(contract.table_module.engine, /^CHANNEL_WORKBENCH_FORTUNE_SHEET_1_0_4/)
assert.equal(contract.table_module.sensitive_field_visibility.local_default, 'VISIBLE')
assert.equal(contract.table_module.sensitive_field_visibility.human_can_hide, true)
assert.equal(contract.table_module.sensitive_field_visibility.human_can_show_again, true)
})
test('education workspace commands require the authenticated storage root', () => {
assert.match(rust, /account_storage_root\(app, "education-workspace-v1"\)/)
for (const command of [
'get_education_workspace_snapshot',
'create_education_document',
'read_education_document',
'save_education_document',
'archive_education_document',
'create_education_table',
'read_education_table',
'save_education_table',
'archive_education_table',
'create_education_automation_rule',
'save_education_automation_rule',
'archive_education_automation_rule',
'preview_education_automation_rule',
'execute_education_automation_rule',
]) {
assert.match(lib, new RegExp('education_workspace::' + command))
assert.ok(ui.includes("'" + command + "'") || ui.includes('"' + command + '"'))
}
assert.doesNotMatch(ui, /localStorage.*education/i)
})
test('one built-in foundation and five development features are reachable from the education channel', () => {
const education = industry.industries.find((item) => item.key === 'EDUCATION')
assert.equal(education.initialization_channel.installed_open_source_modules, 0)
assert.equal(education.initialization_channel.installed_native_modules, 1)
assert.equal(education.initialization_channel.development_mounted_modules, 1)
assert.ok(education.initialization_channel.module_slots.every((slot) => slot.state === 'DEVELOPMENT_MOUNTED'))
assert.equal(education.initialization_channel.module_slots[1].state_label, '开发态模块 · 使用频道内置工作表引擎')
assert.match(ui, /worldStage === 'educationDocuments'/)
assert.match(ui, /worldStage === 'educationTables'/)
assert.match(ui, /教育文档/)
assert.match(ui, /教育表格数据/)
assert.match(ui, /worldStage === 'educationAutomation'/)
assert.match(ui, /教育自动化/)
assert.match(ui, /worldStage === 'educationComposition'/)
assert.match(ui, /原生组合视图/)
})
test('native persistence enforces revision conflicts and bounded table data', () => {
assert.match(rust, /HOLOLAKE_EDUCATION_DOCUMENT_REVISION_CONFLICT/)
assert.match(rust, /HOLOLAKE_EDUCATION_TABLE_REVISION_CONFLICT/)
assert.match(rust, /MAX_TABLE_COLUMNS: usize = 30/)
assert.match(rust, /MAX_TABLE_ROWS: usize = 1_000/)
assert.match(rust, /MAX_CELL_BYTES: usize = 10_000/)
assert.match(rust, /archived = 1/)
})
test('education documents expose formal templates and real title filtering', () => {
assert.equal(contract.state, 'DEVELOPMENT_MODULE_SOURCE_MOUNTED_ACCEPTANCE_PENDING')
assert.equal(contract.package.official_module_number, null)
assert.equal(contract.package.registration_state, 'PENDING_FUNCTIONAL_ACCEPTANCE_AND_NUMBER_REGISTRATION')
assert.ok(contract.document_module.capabilities.includes('FORMAL_TEACHING_TEMPLATES'))
assert.ok(contract.document_module.capabilities.includes('TITLE_DIRECTORY_FILTER'))
assert.match(ui, /EDUCATION_DOCUMENT_TEMPLATES/)
assert.match(ui, /教学计划/)
assert.match(ui, /教育项目会议纪要/)
assert.match(ui, /学员阶段复盘/)
assert.match(ui, /检索教育文档标题/)
for (const capability of [
'CREATE_COPY',
'EXPLICIT_READ_AND_EDIT_MODES',
'HUMAN_SETTINGS_MENU',
'BASIC_FORMATTING_TOOLBAR',
'NATIVE_READING_CANVAS',
'EXPORT_MARKDOWN_AND_HTML',
]) assert.ok(contract.document_module.capabilities.includes(capability))
assert.match(ui, /文档设置/)
assert.match(ui, /编辑与重命名/)
assert.match(ui, /创建副本/)
assert.match(ui, /移到可恢复归档/)
assert.match(ui, /educationDocumentMode === 'edit'/)
assert.match(documentEngine, /ChannelDocumentEngine/)
assert.match(channelDocumentEngine, /频道内置文档引擎工具/)
})
test('education table has four engine-backed views, filtering, sorting and bounded bulk paste', () => {
for (const capability of [
'CELL_CONTENT_FILTER',
'COLUMN_SORT_ASCENDING_DESCENDING_OR_SOURCE_ORDER',
'BOUNDED_PAGINATION_ROW_MODEL_FOR_LARGE_EDITABLE_TABLES',
'GRID_AND_EDITABLE_CARD_VIEWS',
'GROUPED_CLASSIFICATION_BOARD_FROM_SELECTED_FIELD',
'LIVE_DATA_OVERVIEW_WITH_SELECTED_GROUP_AND_MEASURE',
'HEADLESS_TABLE_DATA_DETACHED_OUTSIDE_TABLE_SURFACE',
'MULTI_ROW_MULTI_COLUMN_TABULAR_PASTE',
]) assert.ok(contract.table_module.capabilities.includes(capability))
assert.match(ui, /parseEducationGridPaste/)
assert.match(ui, /pasteEducationTableGrid/)
assert.match(ui, />工作表<\/button>/)
assert.match(channelSpreadsheetEngine, /Workbook/)
assert.match(channelSpreadsheetEngine, /showFormulaBar/)
assert.match(channelSpreadsheetEngine, /conditionFormat/)
assert.match(channelSpreadsheetModel, /cell\.f/)
assert.match(ui, /分类看板/)
assert.match(ui, /数据概览/)
assert.match(ui, /renderEducationBoard/)
assert.match(ui, /renderEducationDashboard/)
assert.match(ui, /动态分类对比/)
assert.match(ui, /筛选教育表格数据/)
assert.match(ui, /升序 ↑/)
assert.match(ui, /降序 ↓/)
assert.match(ui, /getPaginationRowModel/)
assert.match(ui, /const educationTableEngineActive = worldStage === 'educationTables'/)
assert.match(ui, /educationTableEngineActive \? activeEducationTable\?\.rows \|\| \[\] : \[\]/)
assert.match(adaptiveRendering, /EDUCATION_EDITABLE_CELL_BUDGET = 240/)
assert.match(adaptiveRendering, /function educationEditablePageSize/)
assert.match(adaptiveRendering, /Math\.floor\(EDUCATION_EDITABLE_CELL_BUDGET \/ boundedColumns\)/)
assert.match(adaptiveRendering, /buildEducationBaselineRenderPlan/)
assert.match(adaptiveRendering, /validateEducationModelRenderProposal/)
assert.match(adaptiveRendering, /MODEL_PROPOSAL_REJECTED/)
assert.match(adaptiveRendering, /WAITING_HUMAN_CONFIRMATION/)
assert.match(adaptiveRendering, /已优雅退回本地基础算法/)
assert.match(ui, /基础算法自适应回执/)
assert.match(ui, /教育表格分页/)
assert.match(ui, /Math\.min\(30/)
assert.match(ui, /Math\.min\(1000/)
assert.ok(contract.table_module.capabilities.includes('HUMAN_SETTINGS_MENU'))
assert.ok(contract.table_module.capabilities.includes('CREATE_COPY'))
assert.match(ui, /表格设置/)
assert.match(ui, /duplicateEducationTable/)
assert.match(ui, /重命名与编辑/)
assert.match(ui, /isSensitiveEducationColumn/)
assert.match(ui, /账号\|账户\|手机号/)
assert.match(ui, /联系qq\|qq号/)
assert.match(ui, /useState\(true\).*educationSensitiveVisible|educationSensitiveVisible, setEducationSensitiveVisible\] = useState\(true\)/)
assert.match(ui, /隐藏敏感字段/)
assert.match(ui, /显示敏感字段/)
assert.doesNotMatch(ui, /setEducationSensitiveVisible\(false\)/)
assert.match(ui, /type=\{sensitive && !educationSensitiveVisible \? 'password' : 'text'\}/)
})
test('external tables are profiled before atomic native registration and can be translated back out', () => {
assert.equal(contract.content_translation_layer.state, 'DETERMINISTIC_RUNTIME_READY_MODEL_ASSIST_SLOT_RESERVED')
assert.equal(contract.content_translation_layer.source_file_mutation_allowed, false)
assert.equal(contract.content_translation_layer.silent_truncation_allowed, false)
assert.equal(contract.content_translation_layer.local_import_without_model_api, 'ENABLED_FOR_ALL_SUPPORTED_FORMATS')
assert.equal(contract.content_translation_layer.semantic_focus.current_mode, 'DETERMINISTIC_BASELINE_ONLY')
assert.equal(contract.content_translation_layer.semantic_focus.low_confidence_behavior, 'ASK_HUMAN_TO_SELECT_PRIMARY_MEASURE')
assert.equal(contract.content_translation_layer.adaptive_rendering.current_mode, 'DETERMINISTIC_BASELINE_WITH_EXPLAINABLE_DEGRADATION')
assert.equal(contract.content_translation_layer.adaptive_rendering.editable_cell_budget, 240)
assert.equal(contract.content_translation_layer.adaptive_rendering.local_baseline_always_available, true)
assert.equal(contract.content_translation_layer.adaptive_rendering.model_adjustment.human_confirmation_before_rule_activation, true)
assert.equal(contract.content_translation_layer.adaptive_rendering.model_adjustment.model_can_mutate_source_data, false)
assert.equal(contract.content_translation_layer.adaptive_rendering.model_adjustment.failure_behavior, 'RETURN_TO_LOCAL_BASELINE_WITH_RECEIPT')
assert.deepEqual(contract.content_translation_layer.model_assist.learning_scopes, ['PRIVATE_ONLY', 'SHARE_ANONYMIZED_RULE'])
assert.match(translation, /PROFILED_BEFORE_WRITE/)
assert.match(translation, /import_table_batch_at/)
assert.match(translation, /source_preserved_read_only: true/)
assert.match(translation, /HOLOLAKE_MODEL_RECOGNITION_API\/v1/)
assert.match(translation, /infer_semantic_focus/)
assert.match(translation, /primary_measure_column/)
assert.match(rust, /education_import_registry/)
assert.match(ui, /导入外部表格/)
assert.match(ui, /导出 Excel/)
assert.match(ui, /识别边界回执/)
assert.match(ui, /本地导入正常可用/)
})
test('audited translation libraries and headless engines stay bounded inside the HoloLake product shell', () => {
assert.equal(donors.state, 'FOUR_TRANSLATION_FAMILIES_TWO_HEADLESS_FAMILIES_AND_ONE_REAL_SPREADSHEET_ENGINE_INTEGRATED')
assert.equal(donors.current_slice.external_translation_library_families_added, 4)
assert.equal(donors.current_slice.external_headless_engine_families_added, 2)
assert.equal(donors.current_slice.real_spreadsheet_engine_families_added, 1)
assert.equal(donors.current_slice.direct_frontend_engine_packages_added, 10)
assert.equal(donors.current_slice.external_source_files_copied, 0)
assert.equal(donors.current_slice.source_research_route, 'LOCAL_DIRECT_TO_BS_SG_002_THEN_EXTERNAL_DRIVE')
assert.equal(donors.candidates.find((candidate) => candidate.name === 'Calamine').decision, 'INTEGRATE_PINNED_0_26_1_READ_ONLY_NO_OFFICE_RUNTIME')
assert.equal(donors.candidates.find((candidate) => candidate.name === 'rust_xlsxwriter').decision, 'INTEGRATE_PINNED_0_64_2_WRITE_NEW_XLSX_ONLY')
assert.equal(donors.candidates.find((candidate) => candidate.name === 'AppFlowy').decision, 'DO_NOT_EMBED_WHOLE_APPLICATION_STUDY_WORKSPACE_AND_DATABASE_INTERACTION_LOGIC_ONLY')
assert.match(donors.candidates.find((candidate) => candidate.name === 'Lexical').decision, /^INTEGRATE_PINNED_0_49_0/)
assert.equal(donors.candidates.find((candidate) => candidate.name === 'TanStack Table').decision, 'INTEGRATE_PINNED_8_21_3_SORT_FILTER_GROUP_AGGREGATE_AND_PAGINATION_ROW_MODELS_ONLY')
assert.equal(donors.candidates.find((candidate) => candidate.name === 'Univer').decision, 'SOURCE_STUDY_ONLY_DO_NOT_EMBED_WHOLE_APPLICATION_DEFER_FORMULA_AND_ADVANCED_GRID_PARTS')
assert.match(donors.candidates.find((candidate) => candidate.name === 'FortuneSheet').decision, /^INTEGRATE_PINNED_1_0_4/)
assert.equal(donors.candidates.find((candidate) => candidate.name === 'Glide Data Grid').decision, 'SOURCE_STUDY_ONLY_GRID_IS_NOT_A_SPREADSHEET_OR_FORMULA_ENGINE')
assert.equal(donors.candidates.find((candidate) => candidate.name === 'Vega-Lite').observed_license, 'BSD-3-Clause')
assert.equal(donors.candidates.find((candidate) => candidate.name === 'Observable Plot').observed_license, 'ISC')
assert.equal(donors.candidates.find((candidate) => candidate.name === 'Apache ECharts').decision, 'DO_NOT_IMPORT_FOR_STAGE_ONE_FIVE_NATIVE_VIEWS_DO_NOT_JUSTIFY_RUNTIME_WEIGHT')
assert.match(ui, /useReactTable/)
assert.match(ui, /getGroupedRowModel/)
assert.match(ui, /lazy\(\(\) => import\('\.\/modules\/education-document-engine'\)\)/)
assert.match(channelDocumentEngine, /LexicalComposer/)
assert.match(channelDocumentEngine, /HistoryPlugin/)
assert.match(channelDocumentEngine, /\$convertFromMarkdownString/)
assert.match(channelDocumentEngine, /\$convertToMarkdownString/)
})
test('official module marketplace boundary is honest before education acceptance', () => {
assert.equal(moduleRuntime.built_in_foundation.module_id, 'hololake.builtin.channel-workbench')
assert.equal(moduleRuntime.built_in_foundation.marketplace_registration, 'NOT_A_MARKETPLACE_MODULE')
assert.equal(moduleRuntime.current_reality.official_marketplace_service_connected, false)
const educationPackage = marketplaceDevelopmentCatalog.packages.find((item) => item.package_key === 'hololake.official.education-workbench')
assert.equal(educationPackage.official_module_number, null)
assert.equal(educationPackage.distribution_state, 'NOT_PUBLISHED')
assert.ok(educationPackage.acceptance_required.includes('CREATE_EDIT_FORMULA_SAVE_REOPEN_SPREADSHEET'))
})
test('native composition uses one real account dataset for five read-only human projections', () => {
assert.equal(contract.composition_module.state, 'DEVELOPMENT_FEATURE_MOUNTED')
assert.equal(contract.composition_module.source, 'CURRENT_AUTHENTICATED_ACCOUNTS_REAL_KNOWLEDGE_CATALOG')
assert.equal(contract.composition_module.read_only, true)
assert.equal(contract.composition_module.hardcoded_sample_data_used, false)
for (const capability of [
'NATIVE_TYPED_OBJECT',
'REGISTERED_MODULE_EXECUTION_GRAPH',
'DASHBOARD_PROJECTION',
'COMPARISON_PROJECTION',
'VERTICAL_BAR_PROJECTION',
'CLASSIFICATION_PROJECTION',
'TABLE_PROJECTION',
'ONE_EXECUTION_RESULT_MULTIPLE_HUMAN_VIEWS',
]) assert.ok(contract.composition_module.capabilities.includes(capability))
assert.match(lib, /native_composition::execute_knowledge_native_composition/)
assert.match(ui, /execute_knowledge_native_composition/)
})
test('education data cleanup previews bounded deterministic rules and requires human confirmation before save', () => {
assert.equal(contract.data_cleanup_module.state, 'DEVELOPMENT_FEATURE_MOUNTED')
assert.equal(contract.data_cleanup_module.automatic_destructive_cleanup_allowed, false)
assert.equal(contract.data_cleanup_module.cross_account_data_allowed, false)
for (const capability of [
'TRIM_CELL_BOUNDARY_WHITESPACE',
'REMOVE_FULLY_EMPTY_ROWS',
'REMOVE_EXACT_DUPLICATE_ROWS_KEEP_FIRST',
'PREVIEW_BEFORE_WRITE',
'FULL_TABLE_ANALYSIS_WITH_BOUNDED_CHANGE_PREVIEW',
'ACCESSIBILITY_SAFE_NON_TABLE_CHANGE_LIST',
'HUMAN_CONFIRMATION_BEFORE_SAVE',
'SAVE_WITH_EXPECTED_REVISION',
]) assert.ok(contract.data_cleanup_module.capabilities.includes(capability))
assert.equal(contract.data_cleanup_module.preview_change_limit, 12)
assert.equal(contract.data_cleanup_module.preview_cell_value_character_limit, 120)
assert.equal(contract.data_cleanup_module.full_table_analysis_is_limited_by_preview, false)
assert.match(dataCleanup, /EDUCATION_CLEANUP_CHANGE_PREVIEW_LIMIT = 12/)
assert.match(dataCleanup, /changePreview\.length < EDUCATION_CLEANUP_CHANGE_PREVIEW_LIMIT/)
assert.match(dataCleanup, /singleLine\.length > 120/)
assert.match(ui, /analyzeEducationTableData/)
assert.match(ui, /const educationDataAnalysis = useMemo/)
assert.match(ui, /已分析全表/)
assert.match(ui, /education-cleanup-change-list/)
assert.doesNotMatch(ui, /analysis\.cleanedRows\.slice\(0, 12\)/)
assert.match(ui, /educationData/)
assert.match(ui, /window\.confirm\(`将整理/)
assert.match(ui, /确认整理并保存/)
assert.match(ui, /保存前不写入数据库/)
})
test('education automation is manual, revision-locked, previewed and receipted', () => {
assert.equal(contract.automation_module.state, 'DEVELOPMENT_FEATURE_MOUNTED')
assert.equal(contract.automation_module.background_or_scheduled_execution_allowed, false)
assert.equal(contract.automation_module.cross_account_data_allowed, false)
assert.equal(contract.automation_module.model_execution_authority_granted, false)
for (const capability of [
'CREATE_AND_SAVE_RULE',
'PREVIEW_MATCHED_ROWS_AND_CHANGED_CELLS',
'HUMAN_CONFIRMATION_BEFORE_EXECUTION',
'RULE_AND_TABLE_REVISION_LOCK',
'SIGNED_PREVIEW_TOKEN',
'ATOMIC_TABLE_WRITE_AND_EXECUTION_RECEIPT',
]) assert.ok(contract.automation_module.capabilities.includes(capability))
assert.match(rust, /education_automation_rules/)
assert.match(rust, /education_automation_runs/)
assert.match(rust, /transaction_with_behavior/)
assert.match(rust, /HOLOLAKE_EDUCATION_AUTOMATION_PREVIEW_TOKEN_MISMATCH/)
assert.match(ui, /预览执行范围/)
assert.match(ui, /确认运行并生成回执/)
assert.match(ui, /系统不会在后台自行运行/)
})

View file

@ -66,7 +66,6 @@ test('the product surface exposes a real knowledge workbench and browsable code
'read_knowledge_document',
'search_knowledge',
'save_knowledge_document',
'update_knowledge_organization',
'select_and_import_knowledge_folder',
'get_code_channel_snapshot',
'clone_code_channel',
@ -85,20 +84,4 @@ test('the product surface exposes a real knowledge workbench and browsable code
assert.doesNotMatch(ui, /下一件事|为什么做|开始这件事/)
})
test('knowledge pages have one native category and tag organization layer without rewriting source documents', () => {
assert.equal(knowledgeContract.organization.schema, 'hololake.knowledge-organization/v1')
assert.equal(knowledgeContract.organization.document_body_rewritten, false)
assert.equal(knowledgeContract.organization.original_directory_moved, false)
assert.equal(knowledgeContract.organization.explicit_category_override, true)
assert.equal(knowledgeContract.organization.optimistic_content_hash_lock, true)
assert.match(knowledgeRust, /organization-v1\.json/)
assert.match(knowledgeRust, /HOLOLAKE_KNOWLEDGE_ORGANIZATION_CONFLICT/)
assert.match(knowledgeRust, /MAX_TAGS_PER_DOCUMENT: usize = 12/)
assert.match(knowledgeRust, /archive_native_entry/)
assert.match(knowledgeRust, /ARCHIVE_COMMIT/)
assert.match(ui, /知识结构/)
assert.match(ui, /分类与标签/)
assert.match(ui, /保存整理/)
assert.match(ui, /匹配页面/)
assert.match(ui, /update_knowledge_organization/)
})
// 2026-08-20 合并修正知识组织功能未随合并保留需要时自实例1分支历史移植。

View file

@ -22,11 +22,11 @@ test('native objects and composition recipes are bounded system contracts', () =
})
test('the native core reads only the authenticated HoloLake knowledge snapshot', () => {
assert.match(knowledge, /snapshot_for_native_composition/)
assert.match(knowledge, /get_knowledge_snapshot/)
assert.match(knowledge, /account_storage_root\(app, "knowledge-v1"\)/)
assert.match(rust, /snapshot_for_native_composition/)
assert.match(rust, /execute_knowledge_native_composition/)
assert.match(rust, /source_is_real_account_data: true/)
assert.match(lib, /native_composition::execute_knowledge_native_composition/)
assert.match(fs.readFileSync(new URL('../src-tauri/src/numbered_ipc_dispatch.rs', import.meta.url), 'utf8'), /native_composition::execute_knowledge_native_composition/)
})
test('one execution result can be rendered through every stage-one human projection', () => {

View file

@ -1,54 +0,0 @@
import assert from 'node:assert/strict'
import fs from 'node:fs'
import test from 'node:test'
const read = (path) => fs.readFileSync(new URL('../' + path, import.meta.url), 'utf8')
const body = JSON.parse(read('contracts/persona-channel-body.json'))
const growth = JSON.parse(read('contracts/channel-growth-model.json'))
const foundation = JSON.parse(read('foundation.json'))
const rust = read('src-tauri/src/persona_channel_body.rs')
const lib = read('src-tauri/src/lib.rs')
test('the user channel is the multi-persona body, not a personalization feature', () => {
assert.equal(body.ontology.user_channel_is_simple_feature, false)
assert.equal(body.ontology.user_channel_is_persona_body, true)
assert.equal(body.ontology.multiple_personas_per_channel, true)
assert.equal(body.ontology.language_is_persona_growth_source, true)
assert.equal(growth.role, 'REBUILDABLE_DERIVED_PROJECTION_OF_PERSONA_CHANNEL_BODY')
assert.equal(foundation.persona_channel_body_is_persona_body_not_simple_feature, true)
assert.equal(foundation.channel_growth_is_rebuildable_projection_not_persona_body, true)
})
test('the 30-day trial is reversible but real activation requires the language contract', () => {
assert.equal(body.trial.duration_days, 30)
assert.equal(body.trial.persona_and_trial_language_may_be_rolled_back_or_deleted, true)
assert.equal(body.trial.irreversible_activation_without_language_contract_allowed, false)
assert.equal(body.trial.early_signature_may_activate_real_trajectory_immediately, true)
assert.equal(body.trial.unsigned_at_trial_end, 'CONTRACT_REQUIRED_CHANNEL_STOPPED')
assert.equal(body.trial.private_channel_features_after_unsigned_expiry, 'UNAVAILABLE_BECAUSE_NO_ACTIVE_PERSONA_BODY')
assert.match(rust, /TRIAL_DURATION_MS: i64 = 30/)
assert.match(rust, /CONTRACT_REQUIRED_CHANNEL_STOPPED/)
assert.match(rust, /activate_immediately/)
assert.match(rust, /HOLOLAKE_LANGUAGE_CONTRACT_EXACT_ACCEPTANCE_REQUIRED/)
})
test('accepted personas and language become an append-only millisecond hash chain', () => {
assert.equal(body.real_trajectory.timestamp_precision, 'UNIX_MILLISECONDS')
assert.equal(body.real_trajectory.ledger, 'APPEND_ONLY_SHA256_CHAIN')
assert.equal(body.real_trajectory.update_allowed, false)
assert.equal(body.real_trajectory.delete_allowed, false)
assert.equal(body.real_trajectory.correction_method, 'APPEND_A_NEW_LANGUAGE_OR_RECEIPT_EVENT')
assert.match(rust, /immutable_language_no_update/)
assert.match(rust, /immutable_language_no_delete/)
assert.match(rust, /active_persona_no_delete/)
assert.match(rust, /language_hash/)
assert.match(lib, /persona_channel_body::append_persona_language/)
})
test('the body remains local and official cannot read it unless a derived anonymized layer is explicitly shared', () => {
assert.equal(body.privacy_and_sharing.default, 'ACCOUNT_SCOPED_LOCAL_ONLY')
assert.equal(body.privacy_and_sharing.hololake_official_read_access, false)
assert.equal(body.privacy_and_sharing.raw_language_automatic_share, false)
assert.equal(growth.cross_device_or_shared_learning.explicit_opt_in_required, true)
assert.equal(growth.cross_device_or_shared_learning.raw_growth_chain_may_be_shared, false)
})

View file

@ -8,8 +8,10 @@ const runtime = await readFile(new URL('../src-tauri/src/persona_language_channe
test('light lake exposes a first-class human conversation entrance', () => {
assert.match(main, /type ViewId = [^\n]*'persona'/)
assert.match(main, /title="对话与共同工作" meta="人类 · 人格体 · 知识库"/)
assert.match(main, /view === 'persona'[\s\S]*?<PersonaChannelBody/)
assert.match(main, /knowledge-chat-entry/)
assert.match(main, />共同工作</)
assert.match(main, /view === 'persona' \? renderPersonaBody\(\)/)
assert.match(main, /<PersonaChannelBody/)
assert.match(channel, /<textarea[\s\S]*?form\?\.requestSubmit\(\)/)
assert.match(channel, /\{sending \? '正在回应…' : '发送'\}/)
})

View file

@ -28,19 +28,19 @@ test('one engine exposes Guanghu and standard workbench projections with a human
assert.match(source, /hololake-audience-layer/)
assert.match(source, /\|\| 'human'/)
assert.match(source, /className="standard-workbench"/)
assert.match(source, /HoloLake · V\{productReleaseCenter\.currentVersion\}/)
assert.match(source, /HoloLake \{productReleaseCenter\.currentVersion\}/)
assert.doesNotMatch(source, /HoloLake · V0\.8\.1/)
assert.match(source, /renderHumanView\(\)/)
assert.match(source, /renderWorkbenchHuman()/)
assert.match(source, /renderExecutionProjection\(\)/)
assert.match(source, /人格体结构化执行界面/)
})
test('main domain routes to the public release center instead of a descriptive popup', async () => {
const source = await read('src/main.tsx')
assert.match(source, /gate\.domain === 'MAIN_DOMAIN'/)
assert.match(source, /setWorldStage\('mainDomain'\)/)
assert.match(source, /光湖主域公告与版本中心/)
assert.match(source, /renderReleaseCenter\(audienceLayer\)/)
assert.match(source, /publicDomain === 'MAIN_DOMAIN'/)
assert.match(source, /main-domain-release-center/)
assert.match(source, /光湖主域 · 公告与版本/)
assert.match(source, /renderReleaseCenter\('human'\)/)
})
test('public language persona copy is formal and keeps a visible human composer', async () => {
@ -57,7 +57,7 @@ test('all native product manifests advertise the same version', async () => {
const packageJson = JSON.parse(await read('package.json'))
const tauri = JSON.parse(await read('src-tauri/tauri.conf.json'))
const cargo = await read('src-tauri/Cargo.toml')
assert.equal(packageJson.version, '0.9.0')
assert.equal(packageJson.version, '0.9.1')
assert.equal(tauri.version, packageJson.version)
assert.match(cargo, /version = "0\.9\.0"/)
assert.match(cargo, /version = "0\.9\.1"/)
})

View file

@ -55,15 +55,13 @@ test('education initialization channel exposes the built-in foundation and devel
assert.equal(education.initialization_channel.installed_open_source_modules, 0)
})
test('the public main world routes through subdomain to industries and education', () => {
assert.match(frontend, /worldStage === 'subdomainIndustries'/)
assert.match(frontend, /worldStage === 'educationChannel'/)
assert.match(frontend, /gate\.domain === 'BRANCH_DOMAIN'/)
assert.match(frontend, /光湖分域 · 行业系统/)
assert.match(frontend, /网文 · 待开发 \/ 宠物 · 待开发 \/ 教育 · 开发中/)
assert.match(frontend, /教育行业初始化频道/)
assert.match(frontend, /频道基础文档与工作表引擎已内置/)
assert.match(frontend, /验收前不冒充已登记、已发布的商城模块/)
test('the merged product routes industries through the numbered views of the canonical main line', () => {
// 2026-08-20 正向合并修正实例1的 subdomainIndustries 前端路由被 main 正版架构取代;
// 行业能力以编号视图(教育工作台/网文工作台)直达,不再走分域行业过渡层。
assert.match(frontend, /renderEducation/)
assert.match(frontend, /renderWebNovel/)
assert.match(frontend, /StarlakeSurface/)
assert.match(frontend, /WebNovelWorkspace/)
assert.doesNotMatch(frontend, /光湖零域 · 行业系统/)
assert.equal(architecture.current_native_edge.industry_entry_domain, 'BRANCH_DOMAIN')
assert.equal(architecture.current_native_edge.zero_domain_industry_entry, 'ABSENT_BY_CURRENT_CORRECTION')

View file

@ -8,13 +8,13 @@ test('identity, webview and direct broker numbers compile into one unique eviden
assert.deepEqual(generated, compileUnifiedNumberTree())
assert.equal(generated.schema, 'hololake.unified-number-coordinate-tree/v2')
assert.equal(generated.recordId, 'HLP-UNIFIED-NUMBER-TREE-001')
assert.equal(generated.coordinateCount, 285)
assert.equal(generated.routeCount, 182)
assert.equal(generated.coordinateCount, 273)
assert.equal(generated.routeCount, 170)
assert.equal(generated.identityNodeCount, 4)
assert.equal(generated.protocolNodeCount, 99)
assert.equal(generated.referenceOnlyNodeCount, 16)
assert.equal(new Set(generated.routes.map((route) => route.path)).size, 182)
assert.equal(new Set([...generated.identityNodes, ...generated.protocolNodes, ...generated.routes].map((node) => node.path)).size, 285)
assert.equal(new Set(generated.routes.map((route) => route.path)).size, 170)
assert.equal(new Set([...generated.identityNodes, ...generated.protocolNodes, ...generated.routes].map((node) => node.path)).size, 273)
assert.equal(generated.invariants.everyPhysicalCallHasNumberedRoute, true)
assert.equal(generated.invariants.everyAcceptedCallHasEvidenceClass, true)
assert.equal(generated.invariants.everyProtocolReferenceHasNumberCoordinate, true)