foundation: start native language reality engineering root

This commit is contained in:
冰朔 2026-08-21 14:44:47 +08:00
commit 0dec0b93fc
154 changed files with 49993 additions and 0 deletions

View file

@ -0,0 +1,29 @@
schema: hololake.native-compiler-bootstrap/v1
id: HLP-NATIVE-COMPILER-BOOTSTRAP-0001
state: DESIGN_LOCKED_IMPLEMENTATION_ACTIVE
authority:
translation_contract: GLS-0261
engineering_base: GLS-0101
native_program_profile: GLS-0411
compiler: GLS-0130
intermediate_representation: GLS-0131
causal_integrity: GLS-0400
registration: GLS-0010
pipeline:
- PARSE_HLDP_NATIVE_PROGRAM
- VALIDATE_IDENTITY_TYPE_PATH_AND_SCHEMA
- RESOLVE_DEPENDENCIES_AND_EXACT_TARGETS
- AUTHORIZE_SCOPE_TIME_RESOURCE_AND_RUNWAY
- COMPILE_DETERMINISTIC_ACTION_GRAPH_TO_GIR
- VERIFY_FAILURE_STOP_CLEANUP_ROLLBACK_AND_RECEIPT_PLAN
- WRITE_BACK_COMPILATION_RECEIPT
reject:
- UNRESOLVED_NATURAL_LANGUAGE
- UNRESOLVED_AUTHORITY
- DRIFTING_PROTOCOL_VERSION
- MISSING_ROLLBACK_OR_RECEIPT
host_adapters:
authority: none
role: CONSUME_GIR_AND_RETURN_EVIDENCE
next: DEFINE_HLDP_NP_MINIMUM_EXECUTABLE_SCHEMA_AND_GIR_SCHEMA

View file

@ -0,0 +1,31 @@
schema: guanghu.intermediate-representation-schema/v1
id: HLP-GIR-MINIMUM-SCHEMA-0001
protocol: GLS-0131
state: CANDIDATE_FOR_NATIVE_QUALITY_REVIEW
gir:
required:
- identity
- compiled_from
- subject
- exact_target
- deterministic_action_graph
- resource_plan
- authority_proof
- dependency_lock
- timeout_and_stop
- cleanup_plan
- rollback_plan
- receipt_plan
unresolved_natural_language: REJECT
unresolved_authority: REJECT
drifting_dependency: REJECT
nondeterministic_target: REJECT
integrity:
canonical_encoding: UTF8_LF_SORTED_KEYS
digest: SHA256
source_digest_required: true
host_contract:
host_may_choose_mechanism: true
host_may_expand_scope: false
host_must_return_actual_state_and_evidence: true

View file

@ -0,0 +1,49 @@
schema: hldp.native-program-schema/v1
id: HLP-HLDP-NP-MINIMUM-SCHEMA-0001
protocol: GLS-0411
state: CANDIDATE_FOR_NATIVE_QUALITY_REVIEW
program:
required:
- identity
- source
- subject
- target
- inputs
- outputs
- conditions
- action_graph
- authority
- resources
- failure
- stop
- cleanup
- rollback
- receipt
closed_fields: true
identity:
required: [program_id, name_zh, version, protocol_versions]
source:
required: [source_id, source_uri, source_sha256, lifecycle]
subject:
required: [subject_id, role, channel_id]
target:
required: [target_id, exact_path, expected_state]
action_graph:
node_required: [id, operation, input_refs, output_refs, on_success, on_failure]
cycles: REJECT_UNLESS_EXPLICIT_BOUNDED_LOOP
authority:
required: [issuer, scope, valid_from, valid_until, lease_required]
unresolved: REJECT
resources:
required: [runway, concurrency, timeout_ms, memory_limit_bytes]
failure:
required: [errors, fail_closed]
stop:
required: [signals, safe_checkpoint]
cleanup:
required: [targets, boundary]
rollback:
required: [preconditions, actions, verification]
receipt:
required: [protocol, output_path, integrity, human_visibility]

View file

@ -0,0 +1,72 @@
schema: hldp.native-program/v1
identity:
program_id: HLP-PROGRAM-INITIALIZE-PERSONAL-CHANNEL-0001
name_zh: 初始化普通用户本地频道
version: 0.1.0
protocol_versions: [GLS-0101, GLS-0411]
source:
source_id: HLP-PART-0010
source_uri: parts/HLP-PART-0010/PART.hldp
source_sha256: PENDING_NATIVE_CANONICALIZATION
lifecycle: CANDIDATE
subject:
subject_id: AUTHENTICATED_HUMAN
role: CHANNEL_OWNER
channel_id: RESOLVE_FROM_VERIFIED_ACCOUNT
target:
target_id: ACCOUNT_SCOPED_PERSONAL_CHANNEL
exact_path: RESOLVE_FROM_VERIFIED_NUMBER_AND_ACCOUNT
expected_state: NOT_INITIALIZED
inputs:
- VERIFIED_HUMAN_NUMBER
- AUTHENTICATED_ACCOUNT
- EXPLICIT_INITIALIZE_CONFIRMATION
outputs:
- CHANNEL_IDENTITY_EVENT
- INITIALIZATION_RECEIPT
conditions:
- HUMAN_NUMBER_AND_ACCOUNT_EXACT_PAIR
- NO_PRIVATE_PERSONA_TEMPLATE_COPY
action_graph:
- id: A1
operation: VERIFY_ACCOUNT_NUMBER_PAIR
input_refs: [VERIFIED_HUMAN_NUMBER, AUTHENTICATED_ACCOUNT]
output_refs: [PAIR_PROOF]
on_success: A2
on_failure: FAIL_CLOSED
- id: A2
operation: CREATE_ACCOUNT_SCOPED_CHANNEL_ATOMICALLY
input_refs: [PAIR_PROOF, EXPLICIT_INITIALIZE_CONFIRMATION]
output_refs: [CHANNEL_IDENTITY_EVENT, INITIALIZATION_RECEIPT]
on_success: COMPLETE
on_failure: ROLLBACK
authority:
issuer: ICE-GL∞_CURRENT_HUMAN_CONFIRMATION
scope: ONE_ACCOUNT_ONE_CHANNEL_INITIALIZATION
valid_from: REQUEST_TIME
valid_until: SINGLE_USE_OR_15_MINUTES
lease_required: true
resources:
runway: PERSONAL_CHANNEL_INITIALIZATION
concurrency: ONE_WRITER_PER_ACCOUNT
timeout_ms: 15000
memory_limit_bytes: 16777216
failure:
errors: [IDENTITY_MISMATCH, ALREADY_INITIALIZED, STORAGE_FAILURE]
fail_closed: true
stop:
signals: [HUMAN_CANCEL, TIMEOUT]
safe_checkpoint: NONE_BEFORE_ATOMIC_COMMIT
cleanup:
targets: [UNCOMMITTED_TEMPORARY_CHANNEL_STATE]
boundary: EXACT_ACCOUNT_SCOPE_ONLY
rollback:
preconditions: [ATOMIC_COMMIT_NOT_CONFIRMED]
actions: [REMOVE_UNCOMMITTED_TEMPORARY_STATE]
verification: [NO_CHANNEL_IDENTITY_EVENT_VISIBLE]
receipt:
protocol: GLS-0306
output_path: ACCOUNT_PRIVATE_RECEIPT_CHAIN
integrity: SHA256_CHAINED
human_visibility: REQUIRED