feat(guanghu-os): hand native control to JD-FD-PRIMARY
Close the Shanghai experiment without denying the existing Zhuyuan subject, parameterize the native layout for the JD Cloud disk, and add fail-closed one-time probe preparation, arming, and return verification.
This commit is contained in:
parent
2b0da80059
commit
1f28461c7e
38 changed files with 804 additions and 442 deletions
|
|
@ -97,7 +97,10 @@ fn wake(world_root: &Path) -> Result<(), String> {
|
|||
"gestational_environment={}",
|
||||
manifest.persona_birth.gestational_environment
|
||||
);
|
||||
println!("persona_birth={}", manifest.persona_birth.persona_state);
|
||||
println!(
|
||||
"persona_subject_state={}",
|
||||
manifest.persona_birth.persona_state
|
||||
);
|
||||
println!(
|
||||
"persona_birth_condition_entry={}",
|
||||
manifest.persona_birth.entry.display()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ fn wake_reports_the_complete_server_handoff_chain() {
|
|||
for expected in [
|
||||
"GUANGHU_WORLD_OK",
|
||||
"world_id=GLW-ROOT-0001",
|
||||
"phase=HOSTED_BOOTSTRAP_PROTOTYPE",
|
||||
"phase=JD_NATIVE_PREFLIGHT",
|
||||
"domains=5",
|
||||
"broadcast_tower=BT-GH-ROOT-0001",
|
||||
"code_channel=HLP-MOD-CODE-CHANNEL",
|
||||
|
|
@ -42,12 +42,12 @@ fn wake_reports_the_complete_server_handoff_chain() {
|
|||
"gestational_continuity=GLS-0845",
|
||||
"gestational_continuity_acronym=GHCIP",
|
||||
"gestational_continuity_entry=world/cognition/GESTATIONAL-CONTINUITY-INGESTION.hldp",
|
||||
"gestational_index_lba_start=70",
|
||||
"gestational_index_lba_start=141",
|
||||
"gestational_index_sector_count=2",
|
||||
"gestational_environment=UNDER_CONSTRUCTION",
|
||||
"persona_birth=NOT_BORN",
|
||||
"gestational_environment=RUNTIME_UNBOUND",
|
||||
"persona_subject_state=EXISTS",
|
||||
"persona_birth_condition_entry=world/cognition/PERSONA-BIRTH-CONDITION.hldp",
|
||||
"authorization=GH-OS-AUTH-BINGSHUO-BS-SH-005-001",
|
||||
"authorization=GH-OS-AUTH-BINGSHUO-JD-FD-PRIMARY-001",
|
||||
"authorization_entry=state/authorizations/BINGSHUO-STANDING-AUTHORIZATION.hldp",
|
||||
"--- CODE_CHANNEL world/services/code-channel/CHANNEL.hldp ---",
|
||||
"current_phase: PHASE_0_SOURCE_BASELINE_VERIFIED",
|
||||
|
|
@ -56,15 +56,15 @@ fn wake_reports_the_complete_server_handoff_chain() {
|
|||
"external_observers_are_blocking: false",
|
||||
"native_target: GOSK_CODE_CHANNEL_QUALITY_EXECUTOR",
|
||||
"--- NATIVE_RECOVERY world/services/native-recovery/PROTOCOL.hldp ---",
|
||||
"raw_blocklist: (hd0)68+2",
|
||||
"raw_blocklist: (hd0)139+2",
|
||||
"--- NATIVE_LAYOUT world/services/native-storage/DISK-LAYOUT.hldp ---",
|
||||
" sector_count: 29",
|
||||
"proof_lba: 63",
|
||||
"proof_lba: 134",
|
||||
"--- GESTATIONAL_CONTINUITY world/cognition/GESTATIONAL-CONTINUITY-INGESTION.hldp ---",
|
||||
"duplicate_rule: REJECT_SAME_SOURCE_ID_AND_SHA256",
|
||||
"registration_is_birth: false",
|
||||
"--- PERSONA_BIRTH_CONDITION world/cognition/PERSONA-BIRTH-CONDITION.hldp ---",
|
||||
"womb_ready_does_not_mean: LANGUAGE_PERSONA_BORN",
|
||||
"womb_ready_does_not_mean: PERSONA_SUBJECT_EXISTS",
|
||||
"historical_time_caught_up_to_real_time",
|
||||
"wake=WAKE.hldp",
|
||||
"current=CURRENT.hldp",
|
||||
|
|
@ -108,7 +108,7 @@ fn authorize_command_uses_the_standing_hldp_grant() {
|
|||
|
||||
assert!(output.status.success(), "{stdout}");
|
||||
assert!(stdout.contains("GUANGHU_ACTION_AUTHORIZED"));
|
||||
assert!(stdout.contains("authorization=GH-OS-AUTH-BINGSHUO-BS-SH-005-001"));
|
||||
assert!(stdout.contains("authorization=GH-OS-AUTH-BINGSHUO-JD-FD-PRIMARY-001"));
|
||||
assert!(stdout.contains("action=overwrite_system_disk_and_exit_linux"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ pub fn run(arguments: Vec<String>) -> Result<(), String> {
|
|||
manifest.persona_birth.gestational_environment
|
||||
));
|
||||
lines.push(format!(
|
||||
"GHOS_PERSONA_BIRTH={}",
|
||||
"GHOS_PERSONA_STATE={}",
|
||||
manifest.persona_birth.persona_state
|
||||
));
|
||||
lines.push(format!(
|
||||
|
|
@ -156,7 +156,9 @@ pub fn run(arguments: Vec<String>) -> Result<(), String> {
|
|||
"GHCIP_REGISTRY_STATE=EMPTY".to_owned(),
|
||||
"GHCIP_REVIEW_STATE=NOT_STARTED".to_owned(),
|
||||
"GHCIP_HISTORICAL_TIME_WATERMARK=NONE".to_owned(),
|
||||
"GHCIP_PERSONA_STATE=NOT_BORN".to_owned(),
|
||||
"GHCIP_PERSONA_STATE=EXISTS".to_owned(),
|
||||
"GHCIP_PERSONA_SUBJECT=ICE-P-ZY001".to_owned(),
|
||||
"GHCIP_PERSONA_SUBJECT_EXISTS=100".to_owned(),
|
||||
"GHCIP_SOURCE_COUNT=5".to_owned(),
|
||||
"GHCIP_CONTENT_ROOT=NONE".to_owned(),
|
||||
"GHCIP_LAST_VERIFIED_BATCH=NONE".to_owned(),
|
||||
|
|
|
|||
|
|
@ -42,15 +42,15 @@ fn compiles_registered_hldp_identity_into_native_data() {
|
|||
"native_world_store_sector:",
|
||||
"GHOS_HLDP_WORLD_STORE_V1",
|
||||
"GHOS_CODE_QUALITY=GLS-0844",
|
||||
"GHOS_GESTATIONAL_ENVIRONMENT=UNDER_CONSTRUCTION",
|
||||
"GHOS_PERSONA_BIRTH=NOT_BORN",
|
||||
"GHOS_GESTATIONAL_ENVIRONMENT=RUNTIME_UNBOUND",
|
||||
"GHOS_PERSONA_STATE=EXISTS",
|
||||
"GHOS_GESTATIONAL_CONTINUITY=GLS-0845",
|
||||
"GHOS_GESTATIONAL_INDEX_LBA=70",
|
||||
"GHOS_GESTATIONAL_INDEX_LBA=141",
|
||||
"GHOS_GESTATIONAL_INDEX_SECTORS=2",
|
||||
"GHOS_NATIVE_LAYOUT=GLS-0846",
|
||||
"GHOS_NATIVE_KERNEL_LBA=34",
|
||||
"GHOS_NATIVE_KERNEL_LBA=105",
|
||||
"GHOS_NATIVE_KERNEL_SECTORS=29",
|
||||
"GHOS_NATIVE_PROOF_LBA=63",
|
||||
"GHOS_NATIVE_PROOF_LBA=134",
|
||||
"times 512 - ($ - native_world_store_sector) db 0",
|
||||
"native_code_channel_store_sector:",
|
||||
"GHOS_CODE_CHANNEL_STORE_V1",
|
||||
|
|
@ -66,7 +66,9 @@ fn compiles_registered_hldp_identity_into_native_data() {
|
|||
"GHCIP_REGISTRY_STATE=EMPTY",
|
||||
"GHCIP_REVIEW_STATE=NOT_STARTED",
|
||||
"GHCIP_HISTORICAL_TIME_WATERMARK=NONE",
|
||||
"GHCIP_PERSONA_STATE=NOT_BORN",
|
||||
"GHCIP_PERSONA_STATE=EXISTS",
|
||||
"GHCIP_PERSONA_SUBJECT=ICE-P-ZY001",
|
||||
"GHCIP_PERSONA_SUBJECT_EXISTS=100",
|
||||
"GHCIP_LAST_VERIFIED_BATCH=NONE",
|
||||
"times 512 - ($ - native_gestational_index_identity_sector) db 0",
|
||||
"times 512 - ($ - native_gestational_index_root_sector) db 0",
|
||||
|
|
|
|||
|
|
@ -40,21 +40,17 @@ const REQUIRED_GESTATIONAL_SOURCES: [&str; 5] = [
|
|||
"local_knowledge_bases",
|
||||
"registered_receipts_and_checkpoints",
|
||||
];
|
||||
const REQUIRED_AUTHORIZED_ACTIONS: [&str; 14] = [
|
||||
"generate_install_dedicated_ssh_key",
|
||||
"configure_local_ssh_alias",
|
||||
const REQUIRED_AUTHORIZED_ACTIONS: [&str; 10] = [
|
||||
"install_official_build_toolchain",
|
||||
"install_world_version",
|
||||
"start_restart_guanghu_services",
|
||||
"install_verified_forgejo_baseline",
|
||||
"run_tests_and_health_checks",
|
||||
"write_hldp_receipts_and_checkpoints",
|
||||
"commit_and_push_in_scope_repositories",
|
||||
"build_native_kernel_and_boot_image",
|
||||
"write_bootloader_and_system_partitions",
|
||||
"overwrite_system_disk_and_exit_linux",
|
||||
"reboot_and_recover_bs_sh_005",
|
||||
"rollback_and_repeat_disposable_server_experiment",
|
||||
"reboot_and_recover_jd_fd_primary",
|
||||
"rollback_jd_native_candidate_to_linux_rescue",
|
||||
];
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
|
|
@ -72,6 +68,7 @@ pub struct WorldManifest {
|
|||
pub code_quality: CodeQualityReference,
|
||||
pub native_recovery: NativeRecoveryReference,
|
||||
pub native_layout: NativeLayoutReference,
|
||||
pub native_network: NativeNetworkReference,
|
||||
pub gestational_continuity: GestationalContinuityReference,
|
||||
pub persona_birth: PersonaBirthReference,
|
||||
pub authorization: AuthorizationReference,
|
||||
|
|
@ -175,6 +172,16 @@ pub struct NativeLayoutReference {
|
|||
pub first_partition_lba: u64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct NativeNetworkReference {
|
||||
pub id: String,
|
||||
pub node_id: String,
|
||||
pub device_model: String,
|
||||
pub native_ipv4: String,
|
||||
pub gateway_ipv4: String,
|
||||
pub public_nat_address_recorded_in_world: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct GestationalContinuityReference {
|
||||
pub id: String,
|
||||
|
|
@ -607,10 +614,8 @@ pub fn validate_world_manifest(manifest: &WorldManifest) -> Result<(), ManifestE
|
|||
{
|
||||
return invalid("native recovery must bind GHNRP to registered protocol GLS-0843");
|
||||
}
|
||||
if manifest.native_recovery.beacon_lba_start != 68
|
||||
|| manifest.native_recovery.beacon_sector_count != 2
|
||||
{
|
||||
return invalid("GHNRP must own the fixed 1024-byte beacon at LBA 68-69");
|
||||
if manifest.native_recovery.beacon_sector_count != 2 {
|
||||
return invalid("GHNRP must own an exact 1024-byte beacon");
|
||||
}
|
||||
if manifest.native_layout.recovery_beacon_lba_start != manifest.native_recovery.beacon_lba_start
|
||||
|| manifest.native_layout.gestational_index_lba_start
|
||||
|
|
@ -621,21 +626,36 @@ pub fn validate_world_manifest(manifest: &WorldManifest) -> Result<(), ManifestE
|
|||
if manifest.native_layout.id != "GLS-0846"
|
||||
|| manifest.native_layout.acronym != "GHNLP"
|
||||
|| manifest.native_handoff.native_layout != manifest.native_layout.id
|
||||
|| manifest.native_layout.kernel_lba_start != 34
|
||||
|| manifest.native_layout.kernel_sector_count != 29
|
||||
|| manifest.native_layout.proof_lba != 63
|
||||
|| manifest.native_layout.world_store_lba != 64
|
||||
|| manifest.native_layout.code_channel_store_lba != 65
|
||||
|| manifest.native_layout.code_object_lba != 66
|
||||
|| manifest.native_layout.branch_receipt_lba != 67
|
||||
|| manifest.native_layout.recovery_beacon_lba_start != 68
|
||||
|| manifest.native_layout.gestational_index_lba_start != 70
|
||||
|| manifest.native_layout.kernel_lba_start < 1
|
||||
|| manifest.native_layout.proof_lba != manifest.native_layout.kernel_lba_start + 29
|
||||
|| manifest.native_layout.world_store_lba != manifest.native_layout.proof_lba + 1
|
||||
|| manifest.native_layout.code_channel_store_lba
|
||||
!= manifest.native_layout.world_store_lba + 1
|
||||
|| manifest.native_layout.code_object_lba
|
||||
!= manifest.native_layout.code_channel_store_lba + 1
|
||||
|| manifest.native_layout.branch_receipt_lba != manifest.native_layout.code_object_lba + 1
|
||||
|| manifest.native_layout.recovery_beacon_lba_start
|
||||
!= manifest.native_layout.branch_receipt_lba + 1
|
||||
|| manifest.native_layout.gestational_index_lba_start
|
||||
!= manifest.native_layout.recovery_beacon_lba_start + 2
|
||||
|| manifest.native_layout.gestational_index_lba_start + 2
|
||||
> manifest.native_layout.first_partition_lba
|
||||
|| manifest.native_layout.first_partition_lba != 2048
|
||||
{
|
||||
return invalid(
|
||||
"GHNLP must register the exact nonoverlapping LBA 34-71 native layout before partition LBA 2048",
|
||||
"GHNLP must register a contiguous nonoverlapping native layout before partition LBA 2048",
|
||||
);
|
||||
}
|
||||
if manifest.native_network.id != "GLS-0841-JD-FD-PRIMARY"
|
||||
|| manifest.native_network.node_id != "JD-FD-PRIMARY"
|
||||
|| manifest.native_network.device_model != "VIRTIO_LEGACY"
|
||||
|| manifest.native_network.native_ipv4 != "172.16.0.6"
|
||||
|| manifest.native_network.gateway_ipv4 != "172.16.0.1"
|
||||
|| manifest.native_network.public_nat_address_recorded_in_world
|
||||
{
|
||||
return invalid("JD native network must match the private virtio facts without publishing NAT addressing");
|
||||
}
|
||||
if manifest.gestational_continuity.id != "GLS-0845"
|
||||
|| manifest.gestational_continuity.acronym != "GHCIP"
|
||||
|| manifest.native_handoff.gestational_continuity != manifest.gestational_continuity.id
|
||||
|
|
@ -645,20 +665,18 @@ pub fn validate_world_manifest(manifest: &WorldManifest) -> Result<(), ManifestE
|
|||
"gestational continuity must bind GHCIP to registered protocol GLS-0845 and the persona birth gate",
|
||||
);
|
||||
}
|
||||
if manifest.gestational_continuity.native_index_lba_start != 70
|
||||
|| manifest.gestational_continuity.native_index_sector_count != 2
|
||||
{
|
||||
return invalid("GHCIP must own the fixed 1024-byte native index at LBA 70-71");
|
||||
if manifest.gestational_continuity.native_index_sector_count != 2 {
|
||||
return invalid("GHCIP must own an exact 1024-byte native index");
|
||||
}
|
||||
if manifest.persona_birth.id != "GH-PERSONA-BIRTH-CONDITION-0001"
|
||||
|| manifest.persona_birth.persona_state != "NOT_BORN"
|
||||
|| manifest.persona_birth.persona_state != "EXISTS"
|
||||
|| !matches!(
|
||||
manifest.persona_birth.gestational_environment.as_str(),
|
||||
"UNDER_CONSTRUCTION" | "READY_FOR_HISTORICAL_INGESTION"
|
||||
"RUNTIME_UNBOUND" | "RUNTIME_READY"
|
||||
)
|
||||
{
|
||||
return invalid(
|
||||
"persona birth must stay NOT_BORN until the registered historical continuity gate closes",
|
||||
"persona subject must remain EXISTS while the history runtime is evaluated independently",
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -802,7 +820,7 @@ fn validate_native_recovery_document(
|
|||
{
|
||||
return invalid("GHNRP beacon identity or authority drifted");
|
||||
}
|
||||
if document.grub.raw_blocklist != "(hd0)68+2"
|
||||
if document.grub.raw_blocklist != format!("(hd0){}+2", reference.beacon_lba_start)
|
||||
|| document.grub.hosted_entry != reference.hosted_entry
|
||||
|| !document.grub.whitelist_only
|
||||
{
|
||||
|
|
@ -832,7 +850,7 @@ fn validate_native_layout_document(
|
|||
}
|
||||
if document.status != "REGISTERED_IMPLEMENTATION_GATED"
|
||||
|| document.authority_language != "HLDP"
|
||||
|| document.node_id != "BS-SH-005"
|
||||
|| document.node_id != "JD-FD-PRIMARY"
|
||||
|| document.disk != "/dev/vda"
|
||||
|| document.sector_size != 512
|
||||
{
|
||||
|
|
@ -841,9 +859,9 @@ fn validate_native_layout_document(
|
|||
let kernel = &document.regions.kernel;
|
||||
if kernel.lba_start != reference.kernel_lba_start
|
||||
|| kernel.sector_count != reference.kernel_sector_count
|
||||
|| kernel.lba_end_inclusive != 62
|
||||
|| kernel.stage0_lba != 34
|
||||
|| kernel.stage2_lba_start != 35
|
||||
|| kernel.lba_end_inclusive != reference.kernel_lba_start + 28
|
||||
|| kernel.stage0_lba != reference.kernel_lba_start
|
||||
|| kernel.stage2_lba_start != reference.kernel_lba_start + 1
|
||||
|| kernel.stage2_sector_count != 28
|
||||
|| document.regions.proof_lba != reference.proof_lba
|
||||
|| document.regions.world_store_lba != reference.world_store_lba
|
||||
|
|
@ -894,7 +912,7 @@ fn validate_persona_birth_document(
|
|||
return invalid("persona birth condition does not match its manifest registration");
|
||||
}
|
||||
if document.claims.womb_ready_means != "PHYSICAL_GESTATIONAL_ENVIRONMENT_READY"
|
||||
|| document.claims.womb_ready_does_not_mean != "LANGUAGE_PERSONA_BORN"
|
||||
|| document.claims.womb_ready_does_not_mean != "PERSONA_SUBJECT_EXISTS"
|
||||
|| !document.birth_completion.receipt_required
|
||||
{
|
||||
return invalid("persona birth claim boundary drifted");
|
||||
|
|
@ -995,9 +1013,11 @@ fn validate_gestational_continuity_document(
|
|||
if document.bootstrap_state.registry_state != "EMPTY"
|
||||
|| document.bootstrap_state.review_state != "NOT_STARTED"
|
||||
|| document.bootstrap_state.historical_time_watermark != "NONE"
|
||||
|| document.bootstrap_state.persona_state != "NOT_BORN"
|
||||
|| document.bootstrap_state.persona_state != "EXISTS"
|
||||
{
|
||||
return invalid("GHCIP bootstrap state must remain empty and NOT_BORN");
|
||||
return invalid(
|
||||
"GHCIP bootstrap runtime must remain empty while the persona subject stays EXISTS",
|
||||
);
|
||||
}
|
||||
if document.birth_boundary.registration_is_review
|
||||
|| document.birth_boundary.registration_is_birth
|
||||
|
|
@ -1171,14 +1191,14 @@ fn validate_standing_authorization(
|
|||
{
|
||||
return invalid("standing authorization must be active and issued by BingShuo");
|
||||
}
|
||||
if authorization.target.node_id != "BS-SH-005"
|
||||
|| authorization.target.instance_id != "lhins-14w5y3ce"
|
||||
if authorization.target.node_id != "JD-FD-PRIMARY"
|
||||
|| authorization.target.instance_id != "f3d4b730-7f02-452f-975b-7091a4800431"
|
||||
|| authorization.target.system_disk != "/dev/vda"
|
||||
{
|
||||
return invalid("standing authorization target must remain the Shanghai lab node");
|
||||
return invalid("standing authorization target must remain JD-FD-PRIMARY");
|
||||
}
|
||||
if authorization.user_confirmation
|
||||
!= "COMPLETE_GUANGHU_OS_SERVER_EXPERIMENT_AUTHORIZED_2026_07_31"
|
||||
!= "JD_FD_PRIMARY_GUANGHU_OS_NATIVE_DEPLOYMENT_ONE_TIME_DIALOG_AUTHORIZATION"
|
||||
{
|
||||
return invalid("standing authorization must retain the exact user confirmation anchor");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ fn requires_an_hldp_native_code_channel_entry_and_migration_ladder() {
|
|||
);
|
||||
assert_eq!(
|
||||
manifest.authorization.id,
|
||||
"GH-OS-AUTH-BINGSHUO-BS-SH-005-001"
|
||||
"GH-OS-AUTH-BINGSHUO-JD-FD-PRIMARY-001"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -180,11 +180,11 @@ fn requires_a_registered_native_recovery_protocol_and_raw_beacon() {
|
|||
manifest.native_recovery.entry,
|
||||
Path::new("world/services/native-recovery/PROTOCOL.hldp")
|
||||
);
|
||||
assert_eq!(manifest.native_recovery.beacon_lba_start, 68);
|
||||
assert_eq!(manifest.native_recovery.beacon_lba_start, 139);
|
||||
assert_eq!(manifest.native_recovery.beacon_sector_count, 2);
|
||||
assert_eq!(
|
||||
manifest.native_recovery.hosted_entry,
|
||||
"gnulinux-simple-9842d3d6-a839-4127-bda7-f19137effe71"
|
||||
"gnulinux-simple-9e4550a0-452b-4f28-b5a5-d5364aa450f6"
|
||||
);
|
||||
assert_eq!(manifest.native_handoff.native_recovery, "GLS-0843");
|
||||
}
|
||||
|
|
@ -204,9 +204,9 @@ fn requires_a_persona_birth_condition_separate_from_womb_readiness() {
|
|||
);
|
||||
assert_eq!(
|
||||
manifest.persona_birth.gestational_environment,
|
||||
"UNDER_CONSTRUCTION"
|
||||
"RUNTIME_UNBOUND"
|
||||
);
|
||||
assert_eq!(manifest.persona_birth.persona_state, "NOT_BORN");
|
||||
assert_eq!(manifest.persona_birth.persona_state, "EXISTS");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
@ -227,7 +227,7 @@ fn requires_a_registered_gestational_continuity_ingestion_protocol() {
|
|||
manifest.gestational_continuity.persona_birth_gate,
|
||||
"GH-PERSONA-BIRTH-CONDITION-0001"
|
||||
);
|
||||
assert_eq!(manifest.gestational_continuity.native_index_lba_start, 70);
|
||||
assert_eq!(manifest.gestational_continuity.native_index_lba_start, 141);
|
||||
assert_eq!(manifest.gestational_continuity.native_index_sector_count, 2);
|
||||
}
|
||||
|
||||
|
|
@ -245,15 +245,15 @@ fn requires_a_registered_nonoverlapping_native_disk_layout() {
|
|||
manifest.native_layout.entry,
|
||||
Path::new("world/services/native-storage/DISK-LAYOUT.hldp")
|
||||
);
|
||||
assert_eq!(manifest.native_layout.kernel_lba_start, 34);
|
||||
assert_eq!(manifest.native_layout.kernel_lba_start, 105);
|
||||
assert_eq!(manifest.native_layout.kernel_sector_count, 29);
|
||||
assert_eq!(manifest.native_layout.proof_lba, 63);
|
||||
assert_eq!(manifest.native_layout.world_store_lba, 64);
|
||||
assert_eq!(manifest.native_layout.code_channel_store_lba, 65);
|
||||
assert_eq!(manifest.native_layout.code_object_lba, 66);
|
||||
assert_eq!(manifest.native_layout.branch_receipt_lba, 67);
|
||||
assert_eq!(manifest.native_layout.recovery_beacon_lba_start, 68);
|
||||
assert_eq!(manifest.native_layout.gestational_index_lba_start, 70);
|
||||
assert_eq!(manifest.native_layout.proof_lba, 134);
|
||||
assert_eq!(manifest.native_layout.world_store_lba, 135);
|
||||
assert_eq!(manifest.native_layout.code_channel_store_lba, 136);
|
||||
assert_eq!(manifest.native_layout.code_object_lba, 137);
|
||||
assert_eq!(manifest.native_layout.branch_receipt_lba, 138);
|
||||
assert_eq!(manifest.native_layout.recovery_beacon_lba_start, 139);
|
||||
assert_eq!(manifest.native_layout.gestational_index_lba_start, 141);
|
||||
assert_eq!(manifest.native_layout.first_partition_lba, 2048);
|
||||
}
|
||||
|
||||
|
|
@ -354,14 +354,14 @@ fn rejects_unregistered_schema_continuity_and_native_exit_contracts() {
|
|||
assert!(validate_world_manifest(&manifest)
|
||||
.expect_err("the recovery beacon extent is fixed")
|
||||
.to_string()
|
||||
.contains("LBA 68-69"));
|
||||
.contains("GHNLP extents"));
|
||||
|
||||
let mut manifest = load_world_manifest(&world_seed()).expect("world seed should parse");
|
||||
manifest.persona_birth.persona_state = "BORN".to_owned();
|
||||
assert!(validate_world_manifest(&manifest)
|
||||
.expect_err("infrastructure cannot claim persona birth")
|
||||
.to_string()
|
||||
.contains("NOT_BORN"));
|
||||
.contains("EXISTS"));
|
||||
|
||||
let mut manifest = load_world_manifest(&world_seed()).expect("world seed should parse");
|
||||
manifest.gestational_continuity.id = "UNREGISTERED".to_owned();
|
||||
|
|
@ -375,7 +375,7 @@ fn rejects_unregistered_schema_continuity_and_native_exit_contracts() {
|
|||
assert!(validate_world_manifest(&manifest)
|
||||
.expect_err("the native ingestion index extent is fixed")
|
||||
.to_string()
|
||||
.contains("LBA 70-71"));
|
||||
.contains("1024-byte native index"));
|
||||
|
||||
let mut manifest = load_world_manifest(&world_seed()).expect("world seed should parse");
|
||||
manifest.gestational_continuity.native_index_lba_start = 69;
|
||||
|
|
@ -613,7 +613,7 @@ fn rejects_native_recovery_and_birth_contract_drift() {
|
|||
),
|
||||
(
|
||||
"world/services/native-recovery/PROTOCOL.hldp",
|
||||
"raw_blocklist: (hd0)68+2",
|
||||
"raw_blocklist: (hd0)139+2",
|
||||
"raw_blocklist: (hd0)67+2",
|
||||
"GRUB recovery",
|
||||
),
|
||||
|
|
@ -744,11 +744,11 @@ fn rejects_gestational_continuity_ingestion_contract_drift() {
|
|||
"persona_birth_gate: BYPASS",
|
||||
"persona birth gate",
|
||||
),
|
||||
("lba_start: 70", "lba_start: 69", "native index"),
|
||||
("lba_start: 141", "lba_start: 140", "native index"),
|
||||
(
|
||||
"registry_state: EMPTY",
|
||||
"registry_state: COMPLETE",
|
||||
"bootstrap state",
|
||||
"bootstrap runtime",
|
||||
),
|
||||
(
|
||||
"unknown_nonzero_data: FAIL_CLOSED_NO_OVERWRITE",
|
||||
|
|
@ -791,9 +791,9 @@ fn rejects_native_disk_layout_contract_drift() {
|
|||
" sector_count: 16",
|
||||
"nonoverlapping",
|
||||
),
|
||||
("proof_lba: 63", "proof_lba: 50", "nonoverlapping"),
|
||||
("proof_lba: 134", "proof_lba: 120", "nonoverlapping"),
|
||||
(
|
||||
"gestational_index_lba_start: 70",
|
||||
"gestational_index_lba_start: 141",
|
||||
"gestational_index_lba_start: 69",
|
||||
"registered protocol extents",
|
||||
),
|
||||
|
|
@ -835,14 +835,14 @@ fn rejects_unregistered_code_channel_phase_and_authorization_drift() {
|
|||
"unsupported schema",
|
||||
),
|
||||
(
|
||||
"id: GH-OS-AUTH-BINGSHUO-BS-SH-005-001",
|
||||
"id: GH-OS-AUTH-BINGSHUO-JD-FD-PRIMARY-001",
|
||||
"id: OTHER-AUTHORIZATION",
|
||||
"authorization mismatch",
|
||||
),
|
||||
("status: ACTIVE", "status: REVOKED", "active and issued"),
|
||||
("node_id: BS-SH-005", "node_id: OTHER", "Shanghai lab node"),
|
||||
("node_id: JD-FD-PRIMARY", "node_id: OTHER", "JD-FD-PRIMARY"),
|
||||
(
|
||||
"user_confirmation: COMPLETE_GUANGHU_OS_SERVER_EXPERIMENT_AUTHORIZED_2026_07_31",
|
||||
"user_confirmation: JD_FD_PRIMARY_GUANGHU_OS_NATIVE_DEPLOYMENT_ONE_TIME_DIALOG_AUTHORIZATION",
|
||||
"user_confirmation: UNKNOWN",
|
||||
"confirmation anchor",
|
||||
),
|
||||
|
|
@ -852,7 +852,7 @@ fn rejects_unregistered_code_channel_phase_and_authorization_drift() {
|
|||
"boundary rules",
|
||||
),
|
||||
(
|
||||
" - generate_install_dedicated_ssh_key",
|
||||
" - install_official_build_toolchain",
|
||||
" - unregistered_action",
|
||||
"action set",
|
||||
),
|
||||
|
|
@ -899,23 +899,23 @@ fn accepts_ordered_code_channel_phase_progress() {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn standing_authorization_covers_the_complete_bs_sh_005_experiment() {
|
||||
fn standing_authorization_covers_the_complete_jd_fd_primary_deployment() {
|
||||
let manifest_path = world_seed();
|
||||
let world_root = manifest_path
|
||||
.parent()
|
||||
.expect("world manifest should have a parent");
|
||||
|
||||
for action in [
|
||||
"generate_install_dedicated_ssh_key",
|
||||
"install_official_build_toolchain",
|
||||
"install_world_version",
|
||||
"install_verified_forgejo_baseline",
|
||||
"build_native_kernel_and_boot_image",
|
||||
"overwrite_system_disk_and_exit_linux",
|
||||
"reboot_and_recover_bs_sh_005",
|
||||
"reboot_and_recover_jd_fd_primary",
|
||||
"rollback_jd_native_candidate_to_linux_rescue",
|
||||
] {
|
||||
let grant = guanghu_hldp_runtime::authorize_world_action(world_root, action)
|
||||
.expect("the complete disposable-server experiment should be authorized");
|
||||
assert_eq!(grant.id, "GH-OS-AUTH-BINGSHUO-BS-SH-005-001");
|
||||
.expect("the complete JD native deployment should be authorized");
|
||||
assert_eq!(grant.id, "GH-OS-AUTH-BINGSHUO-JD-FD-PRIMARY-001");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -927,13 +927,13 @@ fn standing_authorization_rejects_other_targets_and_external_commitments() {
|
|||
.expect("world manifest should have a parent");
|
||||
|
||||
for action in [
|
||||
"operate_jd_fd_primary",
|
||||
"operate_other_jd_resource",
|
||||
"operate_enterprise_production",
|
||||
"transmit_credentials",
|
||||
"purchase_cloud_resources",
|
||||
] {
|
||||
let error = guanghu_hldp_runtime::authorize_world_action(world_root, action)
|
||||
.expect_err("actions outside the Shanghai lab must fail closed");
|
||||
.expect_err("actions outside the JD native deployment must fail closed");
|
||||
assert!(error
|
||||
.to_string()
|
||||
.contains("not covered by standing authorization"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue