{"id":"f8401a9b-8ff2-46d3-b797-13d9a0676b01","org_id":"5b607c7a-3ba2-4077-b038-cdccd0ce7c34","project_id":"b18679c0-fffb-4308-82b6-9e91be23582f","parent_id":null,"identifier":"BEB-9236","number":9236,"title":"THE VALIDATOR — verify(url), itself declared: the first declared thing, smallest complete example, refutes a broken declaration","description":"Repo: bebondnet/bebond-mcp\nClass: CODE\nLane: part\nFEATURE NAME: THE VALIDATOR\n\nRead first, in this order:\n1. Architecture and unblock order: https://docs.bebond.net/d/4b8d56d7-f07e-4c54-a08a-4268561a9963\n2. The JSON shape: https://docs.bebond.net/d/49dc7f10-1378-4d66-9a22-b13115f8ca8a\n3. Deploy strategy: https://docs.bebond.net/d/c71b0bc6-bf2f-40ff-a667-cd167229c33c\n\n## Why this is the FIRST declared thing, ahead of the reference service\nAlex 2026-09-02: start with the validator as the shape example, then bake it into the loop. That is a better order than the one I had.\n- IT IS THE SELF-TEST ON DAY ONE. The declared thing that describes describe() must itself be a declared thing. Prove that on the validator and a wrong shape surfaces immediately instead of after eight steps of building.\n- IT IS THE SMALLEST COMPLETE EXAMPLE. One real method, a handful of types.\n- IT HAS NO DEPENDENCIES. It reads a URL and returns verdicts. No store, no tenancy, no auth, no container. NOTHING CURRENTLY BROKEN CAN BLOCK IT — which is exactly why it goes first while the loop is still being repaired.\n- IT BOOTSTRAPS EVERYTHING AFTER. Every later declaration is then checked by a thing that is itself declared and checked, rather than the first checker being trusted on faith.\n\n## Deliverable\n1. verify(url): fetch the target's /describe, test every claim it makes, return per-claim VERIFIED / UNPROVEN / REFUTED in contract_run's vocabulary, each verdict naming the claim it judged.\n2. THE VALIDATOR IS ITSELF DECLARED — it serves its own /describe with typed params and typed returns, in the shape it enforces.\n3. IT ISSUES THE DECLARED METHOD, NEVER A PROBE METHOD. Checking a POST route with GET is not a check. Build on contract_run's typed-call path; validate_url is GET-shaped and can never be the verifier.\n4. Claims checked in this build, and only these: every declared route answers WHEN CALLED BY ITS DECLARED METHOD; every method is callable with its declared params; returns match declared types field by field; mutates:false is read-only across two calls; health returns a body. Chains, field-write enforcement and frags come later.\n\n## THE ACCEPTANCE IS THE NEGATIVE TEST, not the self-test\nA validator that verifies itself is circular — if it is wrong it will say it is right. So self-verification is necessary and NOT sufficient.\nIT MUST BE RUN AGAINST A DELIBERATELY BROKEN DECLARATION AND REFUTE THE RIGHT CLAIM, NAMED. A validator that passes everything is indistinguishable from one that does nothing. Build the broken fixture deliberately: a declaration whose stated return type does not match what the service actually returns.\n\n## MEASURED FINDING that shapes this build — Fable ran rule 1 by hand on 2026-09-02\nAgainst https://widgets.abilifi.net/orky-beb-9166: GET / and /describe pass. GET /health returns 200 with an EMPTY BODY. GET /nodes, GET /nodes/test123 and GET /tools/list all return 404 — AND EVERY ONE OF THOSE 404s IS AMBIGUOUS, because a 404 on a POST-only route is indistinguishable from a missing route. Those are opposite verdicts.\nSo the reference service must return 405 METHOD NOT ALLOWED for a declared route reached with the wrong method, or route existence is not observable from outside and conformance is uncheckable by anyone who is not us. That belongs on BEB-9166.\n\n## Acceptance\nverify(url) returns per-claim verdicts against a real service. The validator verifies ITSELF. It REFUTES a deliberately broken declaration on the right named claim. It issues declared methods, proven by a POST-only route being checked with POST. Recording delivered into BB Docs.\n\n## Unverified\n- Whether contract_run's typed-call path is reusable directly or needs extending. Not read.\n- Whether the three POST methods on the reference work at all. Unknown all day; this is the validator's first real job.\n- What a verdict costs per run, which decides whether every completion can afford one.\n\nRefs: BEB-9226 (AOS), BEB-9166 (first subject, plus the 405 fix), BEB-9168 (the auditor calls this), BEB-8771 (contract kinds), BEB-9189.","status":"todo","priority":0,"assignee_id":null,"created_at":1788353109738,"updated_at":1788446136739,"completed_at":null,"due_date":null,"claimed_by":null,"claimed_until":null,"required_capabilities":null,"estimate":300,"cost_ceiling":600,"cancelled_at":null,"last_actor":"unverified:shared"}