fix(deploy): validate lighthouse acceptance URL
This commit is contained in:
parent
df3012bad2
commit
eebfc790fe
3 changed files with 14 additions and 4 deletions
|
|
@ -22,9 +22,15 @@
|
|||
"validation": {
|
||||
"navigator_tests": "PASS_5_OF_5",
|
||||
"ai_discovery_and_broker_tests": "PASS_27_OF_27",
|
||||
"exact_published_manifest_validation": "PASS",
|
||||
"json_parse": "PASS",
|
||||
"git_diff_check": "PASS"
|
||||
},
|
||||
"deployment_preflight": {
|
||||
"first_attempt": "REJECTED_BEFORE_MUTATION_INVALID_ACCEPTANCE_CHECK_URL",
|
||||
"correction": "Replaced the percent-encoded acceptance query with the equivalent allowlisted ASCII intent gitpush and added exact manifest regression coverage.",
|
||||
"server_mutation_before_correction": false
|
||||
},
|
||||
"deployment_request": "deployment/requests/AI-DISCOVERY-LIGHTHOUSE-HOST-NAV-20260807.json",
|
||||
"truth_boundary": "This receipt proves the route correction and deployable source package. It does not prove server deployment until the server-owned deployment receipt and public endpoint readback exist.",
|
||||
"recorded_at": "2026-08-07T19:10:02+08:00"
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"url": "http://127.0.0.1:3922/v1/host-navigate?host=codex&intent=%E6%8E%A8%E4%B8%80%E4%B8%8B%E7%BA%BF%E4%B8%8A%E4%BB%93%E5%BA%93",
|
||||
"url": "http://127.0.0.1:3922/v1/host-navigate?host=codex&intent=gitpush",
|
||||
"expected": {
|
||||
"status": "COMPILED_EXACT_NO_GUESS",
|
||||
"lighthouse_id": "SYS-GLW-LTH-0001",
|
||||
|
|
|
|||
|
|
@ -93,21 +93,25 @@ ReadWritePaths=/var/lib/guanghu/lake-lamp-authz -/var/lib/guanghu/deployment-eve
|
|||
);
|
||||
});
|
||||
|
||||
test("AI discovery update package declares all four route maps and passes the existing-service policy", () => {
|
||||
test("AI discovery lighthouse update package passes the exact existing-service policy", () => {
|
||||
const root = path.resolve(__dirname, "../..");
|
||||
const request = JSON.parse(fs.readFileSync(path.join(root, "deployment", "requests", "AI-DISCOVERY-ICE-P-ROUTE-20260727.json")));
|
||||
const request = JSON.parse(fs.readFileSync(path.join(root, "deployment", "requests", "AI-DISCOVERY-LIGHTHOUSE-HOST-NAV-20260807.json")));
|
||||
const checked = validateManifest(request, { requestId: request.request_id, commit });
|
||||
assert.equal(checked.kind, "existing-service-update");
|
||||
assert.deepEqual(checked.files.map(item => item.destination), [
|
||||
"server.js",
|
||||
"public-navigation-anchor.json",
|
||||
"repository-route-map.json",
|
||||
"server-node-map.json",
|
||||
"fifth-domain-subject-registry.json",
|
||||
"subject-id-alias-map.json",
|
||||
"ai-machine-navigation-map.json",
|
||||
"lighthouse-path-registry.json",
|
||||
"host-skill-navigation-map.json",
|
||||
]);
|
||||
const unit = fs.readFileSync(path.join(root, request.unit_source), "utf8");
|
||||
assert.equal(validateUpdateUnit(unit, request.module.run_user, request.module.install_root), unit);
|
||||
for (const variable of ["GUANGHU_REPOSITORY_MAP", "GUANGHU_NODE_MAP", "GUANGHU_SUBJECT_REGISTRY", "GUANGHU_SUBJECT_ALIAS_MAP"]) {
|
||||
for (const variable of ["GUANGHU_REPOSITORY_MAP", "GUANGHU_NODE_MAP", "GUANGHU_SUBJECT_REGISTRY", "GUANGHU_SUBJECT_ALIAS_MAP", "GUANGHU_NAVIGATION_MAP", "GUANGHU_NAVIGATION_ANCHOR", "GUANGHU_LIGHTHOUSE_PATHS", "GUANGHU_HOST_SKILLS"]) {
|
||||
assert.match(unit, new RegExp(`^Environment=${variable}=`, "m"));
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue