tools: complete login probe todo coverage
This commit is contained in:
@@ -283,6 +283,24 @@ isphere-login-reachability-return-时间戳.zip
|
||||
"ack_or_ref_id": "",
|
||||
"correlation_notes": ""
|
||||
},
|
||||
"runtime_observations": {
|
||||
"app_context_manager_reachable": null,
|
||||
"message_scheduling_reachable": null,
|
||||
"chat_xmpp_authenticated": null,
|
||||
"target_jid_mapping_observed": null,
|
||||
"file_upload_para_observed": null,
|
||||
"ifile_transfer_reachable": null,
|
||||
"file_upload_result_file_id_observed": null,
|
||||
"send_file_message_finalization_observed": null,
|
||||
"notes": "",
|
||||
"failure": {
|
||||
"step": "",
|
||||
"code": "",
|
||||
"classification": "",
|
||||
"message": "",
|
||||
"next_action": ""
|
||||
}
|
||||
},
|
||||
"text_attempt": {
|
||||
"enabled": true,
|
||||
"content_sha256": "",
|
||||
@@ -319,6 +337,36 @@ isphere-login-reachability-return-时间戳.zip
|
||||
"next_action": ""
|
||||
}
|
||||
},
|
||||
"group_probe": {
|
||||
"enabled": false,
|
||||
"group_jid": "",
|
||||
"chatroom_branch_observed": null,
|
||||
"speech_permission_state": "",
|
||||
"upload_permission_state": "",
|
||||
"mute_or_permission_failure_reason": "",
|
||||
"failure": {
|
||||
"step": "",
|
||||
"code": "",
|
||||
"classification": "",
|
||||
"message": "",
|
||||
"next_action": ""
|
||||
}
|
||||
},
|
||||
"fallback_a_route": {
|
||||
"enabled_if_b_route_fails": true,
|
||||
"hwnd": "",
|
||||
"rtbSendMessage_present": null,
|
||||
"btnSend_present": null,
|
||||
"btnSendFile_or_file_menu_present": null,
|
||||
"uia_or_screenshot_ref": "",
|
||||
"failure": {
|
||||
"step": "",
|
||||
"code": "",
|
||||
"classification": "",
|
||||
"message": "",
|
||||
"next_action": ""
|
||||
}
|
||||
},
|
||||
"operator_notes": ""
|
||||
}
|
||||
'@ | Set-Content -LiteralPath (Join-Path $packageDir "LOGIN-REACHABILITY-INPUTS.template.json") -Encoding UTF8
|
||||
@@ -328,7 +376,7 @@ isphere-login-reachability-return-时间戳.zip
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "iSphere login reachability probe input",
|
||||
"type": "object",
|
||||
"required": ["schema_version", "run", "targets", "text_attempt", "file_attempt"],
|
||||
"required": ["schema_version", "run", "targets", "runtime_observations", "text_attempt", "file_attempt", "group_probe", "fallback_a_route"],
|
||||
"properties": {
|
||||
"schema_version": { "const": "2026-07-13.login-reachability.v1" },
|
||||
"run": {
|
||||
@@ -352,8 +400,11 @@ isphere-login-reachability-return-时间戳.zip
|
||||
"group_jid": { "type": "string" }
|
||||
}
|
||||
},
|
||||
"runtime_observations": { "type": "object" },
|
||||
"text_attempt": { "type": "object" },
|
||||
"file_attempt": { "type": "object" }
|
||||
"file_attempt": { "type": "object" },
|
||||
"group_probe": { "type": "object" },
|
||||
"fallback_a_route": { "type": "object" }
|
||||
}
|
||||
}
|
||||
'@ | Set-Content -LiteralPath (Join-Path $packageDir "LOGIN-REACHABILITY-INPUTS.schema.json") -Encoding UTF8
|
||||
@@ -381,12 +432,44 @@ Required when file_attempt.enabled=true:
|
||||
- file_attempt.duplicate_second_file_send_attempted=false
|
||||
- either file_attempt.file_upload_or_sent_record_present=true plus result text, or structured file_attempt.failure
|
||||
|
||||
Required for remaining validation TODO coverage:
|
||||
- runtime_observations records AppContextManager/MessageScheduling/Chat-XMPP/FileUploadPara/IFileTransfer/FileID/sendFileMessage observations or a structured failure.
|
||||
- group_probe records ChatRoom branch and permissions when group_jid is used.
|
||||
- fallback_a_route records hwnd/rtbSendMessage/btnSend/file-menu evidence when B-route fails and A-route evidence is needed.
|
||||
|
||||
Decision:
|
||||
- Production text send remains blocked unless one-shot target + before/after snapshot + sent-record source + content-hash/ack correlation pass.
|
||||
- Production file send remains blocked unless FileUploadPara + IFileTransfer/FileUpload + FileUploadResult.FileID + file-message finalization + file sent-record/ack correlation pass.
|
||||
- A-route/RPA remains backup-only.
|
||||
'@ | Set-Content -LiteralPath (Join-Path $packageDir "EXPECTED-RETURN-FILES.txt") -Encoding UTF8
|
||||
|
||||
@'
|
||||
# TODO-COVERAGE
|
||||
|
||||
This package covers the remaining validation TODO items from the 2026-07-12 login reachability schema.
|
||||
|
||||
P0 coverage:
|
||||
- one-shot test target: LOGIN-REACHABILITY-INPUTS.json / targets
|
||||
- before/after sent-record snapshots: return-evidence/before, after-text, after-file plus sent_record_source
|
||||
- sent-record and ack source: sent_record_source
|
||||
- in-process adapter reachability mode: adapter_reachability
|
||||
- logged-in runtime and loaded assemblies: recorder/probe_client_runtime.json
|
||||
- AppContextManager/IAppContextManager: runtime_observations plus send_entrypoints_preflight.json
|
||||
- Chat/XMPPConnection authenticated state: runtime_observations plus send_entrypoints_preflight.json
|
||||
- FileUploadPara values: server_auth plus runtime_observations
|
||||
- IFileTransfer/FileUpload reachability: runtime_observations plus send_entrypoints_preflight.json
|
||||
- FileUploadResult.FileID: runtime_observations and file_attempt evidence/failure
|
||||
- trans_UploadCompleted/SendFileMessage finalization: runtime_observations and file_attempt evidence/failure
|
||||
- structured failure reasons: text_attempt.failure, file_attempt.failure, runtime_observations.failure, group_probe.failure, fallback_a_route.failure
|
||||
- sent record/ack correlation: correlation output section
|
||||
|
||||
P1 coverage:
|
||||
- group ChatRoom branch and permissions: group_probe
|
||||
- A-route fallback UI evidence: fallback_a_route
|
||||
|
||||
The package still does not auto-send, auto-upload, click, type, inject, hook, or enable production send.
|
||||
'@ | Set-Content -LiteralPath (Join-Path $packageDir "TODO-COVERAGE.md") -Encoding UTF8
|
||||
|
||||
@'
|
||||
@echo off
|
||||
setlocal
|
||||
@@ -584,6 +667,19 @@ function Add-ValidationFailure([System.Collections.Generic.List[object]]$List, [
|
||||
}) | Out-Null
|
||||
}
|
||||
|
||||
function Test-StructuredFailure($Failure) {
|
||||
if ($null -eq $Failure) { return $false }
|
||||
return (Test-NonEmptyString $Failure.step) -and
|
||||
(Test-NonEmptyString $Failure.code) -and
|
||||
(Test-NonEmptyString $Failure.classification) -and
|
||||
(Test-NonEmptyString $Failure.next_action)
|
||||
}
|
||||
|
||||
function Test-ObservedOrStructuredFailure($Observed, $Failure) {
|
||||
if ($Observed -eq $true) { return $true }
|
||||
return Test-StructuredFailure $Failure
|
||||
}
|
||||
|
||||
if (-not (Test-Path -LiteralPath $inputsPath)) {
|
||||
throw "missing LOGIN-REACHABILITY-INPUTS.json; run 00-prepare-inputs.bat first"
|
||||
}
|
||||
@@ -616,6 +712,21 @@ if (-not (Test-NonEmptyString $inputs.targets.direct_jid)) {
|
||||
Add-ValidationFailure $validationFailures "DIRECT_TARGET_MISSING" "targets.direct_jid is required"
|
||||
}
|
||||
|
||||
foreach ($field in @(
|
||||
"app_context_manager_reachable",
|
||||
"message_scheduling_reachable",
|
||||
"chat_xmpp_authenticated",
|
||||
"target_jid_mapping_observed",
|
||||
"file_upload_para_observed",
|
||||
"ifile_transfer_reachable",
|
||||
"file_upload_result_file_id_observed",
|
||||
"send_file_message_finalization_observed"
|
||||
)) {
|
||||
if (-not (Test-ObservedOrStructuredFailure $inputs.runtime_observations.$field $inputs.runtime_observations.failure)) {
|
||||
Add-ValidationFailure $validationFailures ("RUNTIME_" + $field.ToUpperInvariant() + "_MISSING") ("runtime_observations." + $field + " must be true or runtime_observations.failure must be structured")
|
||||
}
|
||||
}
|
||||
|
||||
$textEnabled = ($inputs.run.one_shot_text_enabled -eq $true) -or ($inputs.text_attempt.enabled -eq $true)
|
||||
if ($textEnabled) {
|
||||
if ($inputs.run.one_text_send_only_confirmed -ne $true) {
|
||||
@@ -678,6 +789,28 @@ if ($fileEnabled) {
|
||||
}
|
||||
}
|
||||
|
||||
$groupEnabled = ($inputs.group_probe.enabled -eq $true) -or (Test-NonEmptyString $inputs.targets.group_jid)
|
||||
if ($groupEnabled) {
|
||||
if (-not (Test-NonEmptyString $inputs.group_probe.group_jid) -and -not (Test-NonEmptyString $inputs.targets.group_jid)) {
|
||||
Add-ValidationFailure $validationFailures "GROUP_JID_MISSING" "group_probe.group_jid or targets.group_jid is required when group probe is enabled"
|
||||
}
|
||||
$groupObserved = ($inputs.group_probe.chatroom_branch_observed -eq $true) -and
|
||||
((Test-NonEmptyString $inputs.group_probe.speech_permission_state) -or (Test-NonEmptyString $inputs.group_probe.upload_permission_state))
|
||||
if (-not $groupObserved -and -not (Test-StructuredFailure $inputs.group_probe.failure)) {
|
||||
Add-ValidationFailure $validationFailures "GROUP_OBSERVATION_OR_FAILURE_MISSING" "group_probe needs ChatRoom/permission evidence or structured failure"
|
||||
}
|
||||
}
|
||||
|
||||
$fallbackNeeded = ($inputs.fallback_a_route.enabled_if_b_route_fails -eq $true) -and (Test-StructuredFailure $inputs.runtime_observations.failure)
|
||||
if ($fallbackNeeded) {
|
||||
$fallbackObserved = (Test-NonEmptyString $inputs.fallback_a_route.hwnd) -and
|
||||
($inputs.fallback_a_route.rtbSendMessage_present -eq $true) -and
|
||||
($inputs.fallback_a_route.btnSend_present -eq $true)
|
||||
if (-not $fallbackObserved -and -not (Test-StructuredFailure $inputs.fallback_a_route.failure)) {
|
||||
Add-ValidationFailure $validationFailures "FALLBACK_A_ROUTE_EVIDENCE_MISSING" "fallback_a_route needs hwnd/rtbSendMessage/btnSend evidence or structured failure when B-route fails"
|
||||
}
|
||||
}
|
||||
|
||||
$beforeRuntime = Read-ProbeJson -Stage "before" -Name "probe_client_runtime.json"
|
||||
$beforePreflight = Read-ProbeJson -Stage "before" -Name "send_entrypoints_preflight.json"
|
||||
$beforeNetwork = Read-ProbeJson -Stage "before" -Name "network_inventory.json"
|
||||
@@ -700,6 +833,15 @@ if ($textEnabled -and $inputs.text_attempt.success_ack_or_sent_record_present -n
|
||||
if ($fileEnabled -and $inputs.file_attempt.file_upload_or_sent_record_present -ne $true -and (Test-NonEmptyString $inputs.file_attempt.failure.code)) {
|
||||
$failures.Add($inputs.file_attempt.failure) | Out-Null
|
||||
}
|
||||
if (Test-StructuredFailure $inputs.runtime_observations.failure) {
|
||||
$failures.Add($inputs.runtime_observations.failure) | Out-Null
|
||||
}
|
||||
if ($groupEnabled -and (Test-StructuredFailure $inputs.group_probe.failure)) {
|
||||
$failures.Add($inputs.group_probe.failure) | Out-Null
|
||||
}
|
||||
if ($fallbackNeeded -and (Test-StructuredFailure $inputs.fallback_a_route.failure)) {
|
||||
$failures.Add($inputs.fallback_a_route.failure) | Out-Null
|
||||
}
|
||||
|
||||
$output = [ordered]@{
|
||||
run = [ordered]@{
|
||||
@@ -719,12 +861,15 @@ $output = [ordered]@{
|
||||
runtime = $runtimeSummary
|
||||
reachability = [ordered]@{
|
||||
in_process_adapter = $inputs.adapter_reachability
|
||||
operator_runtime_observations = $inputs.runtime_observations
|
||||
entrypoints = $entrypoints
|
||||
app_context_manager = if ($entrypoints.Contains("text_high_level_by_jid")) { $entrypoints["text_high_level_by_jid"] } else { $null }
|
||||
message_scheduling = if ($entrypoints.Contains("text_message_scheduler")) { $entrypoints["text_message_scheduler"] } else { $null }
|
||||
chat_xmpp = if ($entrypoints.Contains("text_wire_chat_send")) { $entrypoints["text_wire_chat_send"] } else { $null }
|
||||
file_upload = if ($entrypoints.Contains("file_service_upload")) { $entrypoints["file_service_upload"] } else { $null }
|
||||
file_message = if ($entrypoints.Contains("file_wire_message")) { $entrypoints["file_wire_message"] } else { $null }
|
||||
group_probe = $inputs.group_probe
|
||||
fallback_a_route = $inputs.fallback_a_route
|
||||
}
|
||||
server_auth = [ordered]@{
|
||||
operator_supplied = $inputs.server_auth
|
||||
@@ -740,6 +885,8 @@ $output = [ordered]@{
|
||||
attempts = [ordered]@{
|
||||
text = $inputs.text_attempt
|
||||
file = $inputs.file_attempt
|
||||
group = $inputs.group_probe
|
||||
fallback_a_route = $inputs.fallback_a_route
|
||||
}
|
||||
failures = $failures
|
||||
correlation = [ordered]@{
|
||||
@@ -765,7 +912,8 @@ $items = @(
|
||||
$outputPath,
|
||||
$evidenceRoot,
|
||||
(Join-Path $root "EXPECTED-RETURN-FILES.txt"),
|
||||
(Join-Path $root "OPERATOR-STEPS.md")
|
||||
(Join-Path $root "OPERATOR-STEPS.md"),
|
||||
(Join-Path $root "TODO-COVERAGE.md")
|
||||
)
|
||||
Compress-Archive -Path $items -DestinationPath $zip -Force
|
||||
|
||||
@@ -804,6 +952,7 @@ pause
|
||||
"entrypoint": "RUN-LOGIN-REACHABILITY-SUITE.bat",
|
||||
"input_template": "LOGIN-REACHABILITY-INPUTS.template.json",
|
||||
"return_zip_script": "CREATE-RETURN-ZIP.ps1",
|
||||
"todo_coverage": "TODO-COVERAGE.md",
|
||||
"recorder_exe": "recorder/ISphereLiveProbeRecorder.exe",
|
||||
"capability_smoke_exe": "tools/isphere-capability-smoke.exe",
|
||||
"required_output_schema_sections": [
|
||||
@@ -819,6 +968,11 @@ pause
|
||||
],
|
||||
"production_send_enabled": false,
|
||||
"production_file_send_enabled": false,
|
||||
"remaining_todo_completed": [
|
||||
"runtime_observations",
|
||||
"group_probe",
|
||||
"fallback_a_route"
|
||||
],
|
||||
"a_route_rpa": "backup_only"
|
||||
}
|
||||
'@ | Set-Content -LiteralPath (Join-Path $packageDir "LOGIN-REACHABILITY-PACKAGE-MANIFEST.json") -Encoding UTF8
|
||||
|
||||
@@ -29,6 +29,7 @@ if ($LASTEXITCODE -ne 0) {
|
||||
$requiredFiles = @(
|
||||
"README.txt",
|
||||
"OPERATOR-STEPS.md",
|
||||
"TODO-COVERAGE.md",
|
||||
"EXPECTED-RETURN-FILES.txt",
|
||||
"LOGIN-REACHABILITY-INPUTS.template.json",
|
||||
"LOGIN-REACHABILITY-INPUTS.schema.json",
|
||||
@@ -60,6 +61,7 @@ foreach ($relative in $requiredFiles) {
|
||||
$instructionText = @(
|
||||
Get-Content -LiteralPath (Join-Path $packageRoot "README.txt") -Raw
|
||||
Get-Content -LiteralPath (Join-Path $packageRoot "OPERATOR-STEPS.md") -Raw
|
||||
Get-Content -LiteralPath (Join-Path $packageRoot "TODO-COVERAGE.md") -Raw
|
||||
Get-Content -LiteralPath (Join-Path $packageRoot "EXPECTED-RETURN-FILES.txt") -Raw
|
||||
Get-Content -LiteralPath (Join-Path $packageRoot "LOGIN-REACHABILITY-INPUTS.template.json") -Raw
|
||||
Get-Content -LiteralPath (Join-Path $packageRoot "LOGIN-REACHABILITY-PACKAGE-MANIFEST.json") -Raw
|
||||
@@ -86,6 +88,10 @@ foreach ($needle in @(
|
||||
"duplicate_second_file_send_attempted",
|
||||
"production_send_enabled",
|
||||
"production_file_send_enabled",
|
||||
"runtime_observations",
|
||||
"group_probe",
|
||||
"fallback_a_route",
|
||||
"TODO-COVERAGE",
|
||||
"backup_only"
|
||||
)) {
|
||||
if ($instructionText -notmatch [regex]::Escape($needle)) {
|
||||
@@ -109,8 +115,18 @@ $inputs.run.one_shot_file_enabled = $true
|
||||
$inputs.run.one_text_send_only_confirmed = $true
|
||||
$inputs.run.one_file_send_only_confirmed = $true
|
||||
$inputs.targets.direct_jid = "test-direct@example.invalid"
|
||||
$inputs.targets.group_jid = "test-group@example.invalid"
|
||||
$inputs.targets.target_selection_source = "verify-script"
|
||||
$inputs.targets.self_send_or_sandbox_account_confirmed = $true
|
||||
$inputs.runtime_observations.app_context_manager_reachable = $true
|
||||
$inputs.runtime_observations.message_scheduling_reachable = $true
|
||||
$inputs.runtime_observations.chat_xmpp_authenticated = $true
|
||||
$inputs.runtime_observations.target_jid_mapping_observed = $true
|
||||
$inputs.runtime_observations.file_upload_para_observed = $true
|
||||
$inputs.runtime_observations.ifile_transfer_reachable = $true
|
||||
$inputs.runtime_observations.file_upload_result_file_id_observed = $true
|
||||
$inputs.runtime_observations.send_file_message_finalization_observed = $true
|
||||
$inputs.runtime_observations.notes = "synthetic runtime observations"
|
||||
$inputs.text_attempt.content_sha256 = ("a" * 64)
|
||||
$inputs.text_attempt.content_length = 16
|
||||
$inputs.text_attempt.operator_clicked_send_at_local = "2026-07-13T09:01:00+08:00"
|
||||
@@ -127,6 +143,17 @@ $inputs.file_attempt.after_recorder_present = $true
|
||||
$inputs.file_attempt.file_upload_or_sent_record_present = $true
|
||||
$inputs.file_attempt.file_upload_or_sent_record = "synthetic file sent-record ack for verify script"
|
||||
$inputs.file_attempt.duplicate_second_file_send_attempted = $false
|
||||
$inputs.group_probe.enabled = $true
|
||||
$inputs.group_probe.group_jid = "test-group@example.invalid"
|
||||
$inputs.group_probe.chatroom_branch_observed = $true
|
||||
$inputs.group_probe.speech_permission_state = "allowed"
|
||||
$inputs.group_probe.upload_permission_state = "allowed"
|
||||
$inputs.fallback_a_route.enabled_if_b_route_fails = $true
|
||||
$inputs.fallback_a_route.hwnd = "0x1234"
|
||||
$inputs.fallback_a_route.rtbSendMessage_present = $true
|
||||
$inputs.fallback_a_route.btnSend_present = $true
|
||||
$inputs.fallback_a_route.btnSendFile_or_file_menu_present = $true
|
||||
$inputs.fallback_a_route.uia_or_screenshot_ref = "synthetic fallback evidence"
|
||||
$inputs.sent_record_source.source_type = "synthetic"
|
||||
$inputs.sent_record_source.source_path_or_ref = "verify-script"
|
||||
$inputs.sent_record_source.before_count = "1"
|
||||
|
||||
Reference in New Issue
Block a user