Spaces:
Sleeping
Sleeping
Download examples/equipment-maintenance/validation-evidence.json from dellweb3/VibeCoding: direct link, hf CLI and curl.
- Browser
- Download file 20.3 kB
-
https://huggingface.co/spaces/dellweb3/VibeCoding/resolve/main/examples/equipment-maintenance/validation-evidence.json
- Command line
-
hf download hf://spaces/dellweb3/VibeCoding/examples/equipment-maintenance/validation-evidence.json
-
curl -L -o validation-evidence.json https://huggingface.co/spaces/dellweb3/VibeCoding/resolve/main/examples/equipment-maintenance/validation-evidence.json
20.3 kB
| { | |
| "digest": "e841c6e5768c0f70233e5fcb63ebb2608d14e6ffa7e867845dc66c66436093d1", | |
| "manifest": { | |
| "approvals": [ | |
| { | |
| "authorization_ref": "local-web-delegation-v1:local-example-builder", | |
| "digest": "96d5067a80e7cefdb40c7fe3bcdea8c83d7468b9acc6e3804defd9fa154f1571", | |
| "increment": true, | |
| "mechanism": "delegated_local_validation", | |
| "node": "design_confirm", | |
| "scope": "design", | |
| "user_id": "local-example-builder" | |
| }, | |
| { | |
| "authorization_ref": "local-web-delegation-v1:local-example-builder", | |
| "digest": "5a04ba9ff05dbefcc974ac197b40047bdec3a9d40e3016da819060d4db6ff355", | |
| "increment": true, | |
| "mechanism": "delegated_local_validation", | |
| "node": "execution_confirm", | |
| "scope": "execution", | |
| "user_id": "local-example-builder" | |
| } | |
| ], | |
| "candidate": { | |
| "classes_digest": "d192a049415721587bfe4c6d2fde3beb22e1cf2f907f72a20b59930a8213d24a", | |
| "config_digest": "b3954b40cfbd1ff2d72f434555b55587bf73a86af3d8ecf03a9da2572594955f", | |
| "container": "zk-run-223b16abf0914b9b9fd0945f89113209", | |
| "execution_mode": "qemu", | |
| "image": "zkcoding-qemu@sha256:66091b8b48c22addf6f7db9fdce2cc45ac71065239e696c1b41947d539c8a1b1", | |
| "isolation": { | |
| "disposable": true, | |
| "host_mounts": [], | |
| "memory_mb": 1024, | |
| "network": "none", | |
| "vcpu": 1 | |
| }, | |
| "passed": true, | |
| "receipt_digest": "2a0625e675566344aeb29f836b8b34b1198457188512da1c333373e86996eddb", | |
| "receipt_ref": "run-223b16abf0914b9b9fd0945f89113209-8c5b06657c514f48b73e238fcaec9735", | |
| "source_digest": "0ff92de11f74b87db8621ca7aa7b6ab7011a9b31896c582fe94e5a1e00006030", | |
| "stage": "build", | |
| "suite_digest": "159acbe045b38ca5ee46036e1143dea75c5bd126066b09ead64165bdf629f2cc" | |
| }, | |
| "deployment": "not_performed", | |
| "human_acceptance": false, | |
| "model_calls": [ | |
| { | |
| "charged": 3282, | |
| "id": 10, | |
| "prompt_digest": "667800e4f71c3f04a6c1adf73f3d863c5938bea4f223dd267e8c7f069554ad69", | |
| "provider": "workos-authorized-qwen3.8-flash", | |
| "reservation": 15397, | |
| "run_id": "run-6d79666adc43423c86dba9a4a0e4ff5c", | |
| "state": "settled" | |
| }, | |
| { | |
| "charged": 3116, | |
| "id": 11, | |
| "prompt_digest": "79d51ac0ab0874c932e2f634d15e7bf40cb73cd6c066976cbad3dfe81771ae87", | |
| "provider": "workos-authorized-qwen3.8-flash", | |
| "reservation": 8849, | |
| "run_id": "run-6d79666adc43423c86dba9a4a0e4ff5c", | |
| "state": "settled" | |
| }, | |
| { | |
| "charged": null, | |
| "id": 12, | |
| "prompt_digest": "3521287b7d6278453222ee35d51eae838383fc538cf73bc7b80ce61e6b36bdbd", | |
| "provider": "workos-authorized-qwen3.8-flash", | |
| "reservation": 20000, | |
| "run_id": "run-6d79666adc43423c86dba9a4a0e4ff5c", | |
| "state": "unknown" | |
| } | |
| ], | |
| "preview": { | |
| "cases": 1, | |
| "classes_digest": "d192a049415721587bfe4c6d2fde3beb22e1cf2f907f72a20b59930a8213d24a", | |
| "config_digest": "b3954b40cfbd1ff2d72f434555b55587bf73a86af3d8ecf03a9da2572594955f", | |
| "container": "zk-run-223b16abf0914b9b9fd0945f89113209", | |
| "execution_mode": "qemu", | |
| "image": "zkcoding-qemu@sha256:66091b8b48c22addf6f7db9fdce2cc45ac71065239e696c1b41947d539c8a1b1", | |
| "isolation": { | |
| "disposable": true, | |
| "host_mounts": [], | |
| "memory_mb": 1024, | |
| "network": "none", | |
| "vcpu": 1 | |
| }, | |
| "passed": true, | |
| "passed_cases": 1, | |
| "preview_scope": "disposable-vm-loopback-http", | |
| "receipt_digest": "2a0625e675566344aeb29f836b8b34b1198457188512da1c333373e86996eddb", | |
| "receipt_ref": "run-223b16abf0914b9b9fd0945f89113209-8c5b06657c514f48b73e238fcaec9735", | |
| "source_digest": "0ff92de11f74b87db8621ca7aa7b6ab7011a9b31896c582fe94e5a1e00006030", | |
| "stage": "preview", | |
| "suite_digest": "159acbe045b38ca5ee46036e1143dea75c5bd126066b09ead64165bdf629f2cc" | |
| }, | |
| "repair_origin": { | |
| "generation_run": "run-6d79666adc43423c86dba9a4a0e4ff5c", | |
| "generation_status": "unknown", | |
| "method": "Codex-reviewed-source-repair", | |
| "note": "Original failed/unknown model run is preserved. Codex repaired return types, method checks, exact paths and input validation. This independent verification makes no further model call.", | |
| "original_source_digest": "9badceac1214a6efe4b8d9756254ffbd0bc92d2e67469da05906a1d66f1227d0" | |
| }, | |
| "repairs": 2, | |
| "run_id": "run-223b16abf0914b9b9fd0945f89113209", | |
| "sandbox_cleaned": true, | |
| "snapshot": { | |
| "budget": { | |
| "max_model_calls": 3, | |
| "max_repairs": 1, | |
| "max_seconds": 1800, | |
| "max_tokens": 60000 | |
| }, | |
| "execution_order": [ | |
| "start", | |
| "requirements", | |
| "knowledge", | |
| "context", | |
| "design", | |
| "design_confirm", | |
| "execution_confirm", | |
| "code", | |
| "patch", | |
| "policy", | |
| "build", | |
| "test", | |
| "preview", | |
| "acceptance", | |
| "evidence", | |
| "end" | |
| ], | |
| "execution_status": "not_started", | |
| "framework": { | |
| "allowed_paths": [ | |
| "src/main/", | |
| "src/test/", | |
| "docs/" | |
| ], | |
| "build_tool": "jdk", | |
| "dependencies": {}, | |
| "evidence_refs": [ | |
| "local-toolchain:zkcoding-qemu@sha256:2edf0743d12d34c25322e39a85539591b0a57c8007739a77c4de3351770fd473", | |
| "user-authorized-local-validation" | |
| ], | |
| "frontend": [ | |
| "html", | |
| "javascript", | |
| "css" | |
| ], | |
| "java_release": 17, | |
| "language": "java", | |
| "profile_id": "java17-standard-web", | |
| "state": "approved", | |
| "version": "0.1.0" | |
| }, | |
| "knowledge": [ | |
| { | |
| "collection_id": "java-basics", | |
| "digest": "6de6f354ff0e845da78ad210164775f51d9a4c5f01a1e5e355911423bd6a5b5c", | |
| "enterprise_approved": false, | |
| "quality_status": "imported_unreviewed", | |
| "revision": "corpus-6de6f354ff0e845da78ad210", | |
| "scope": "reference" | |
| }, | |
| { | |
| "collection_id": "java-patterns", | |
| "digest": "803bd1aef5f0764242a56a8c85a3eca81b26cebbe4ec3e6b53d3c4da8864aa2d", | |
| "enterprise_approved": false, | |
| "quality_status": "imported_unreviewed", | |
| "revision": "corpus-803bd1aef5f0764242a56a8c", | |
| "scope": "reference" | |
| }, | |
| { | |
| "collection_id": "equipment-ops", | |
| "digest": "ee7ceae413875d0cf25a69d9b7cc6f6ff93d88898c9d7584b5b68be7502d06d1", | |
| "enterprise_approved": false, | |
| "quality_status": "imported_unreviewed", | |
| "revision": "corpus-ee7ceae413875d0cf25a69d9", | |
| "scope": "reference" | |
| }, | |
| { | |
| "collection_id": "java-frameworks", | |
| "digest": "28b65fe6ced6682555c8b32b676faf14020011ea525eeee57f17562acd17da4c", | |
| "enterprise_approved": false, | |
| "quality_status": "imported_unreviewed", | |
| "revision": "corpus-28b65fe6ced6682555c8b32b", | |
| "scope": "reference" | |
| }, | |
| { | |
| "collection_id": "web-development", | |
| "digest": "84c82986259278c89a30d2660f66454f0a5bcb10f871c96c7ec4ea9ebb47e02a", | |
| "enterprise_approved": false, | |
| "quality_status": "imported_unreviewed", | |
| "revision": "corpus-84c82986259278c89a30d266", | |
| "scope": "reference" | |
| }, | |
| { | |
| "collection_id": "java-persistence", | |
| "digest": "972ee7e1f0072e413bec262b67b8af46364ff8aac445a9faeeeb8c041eb07f92", | |
| "enterprise_approved": false, | |
| "quality_status": "imported_unreviewed", | |
| "revision": "corpus-972ee7e1f0072e413bec262b", | |
| "scope": "reference" | |
| }, | |
| { | |
| "collection_id": "java-testing", | |
| "digest": "8af9017057c130eef9f9a1617a2654859ba80ed4f108b28054aecf14a3d39c45", | |
| "enterprise_approved": false, | |
| "quality_status": "imported_unreviewed", | |
| "revision": "corpus-8af9017057c130eef9f9a161", | |
| "scope": "reference" | |
| }, | |
| { | |
| "collection_id": "java-integration", | |
| "digest": "befde1177fa13476703d89a8df3902d90ad01cb7d497d0583cfe15620348c7b1", | |
| "enterprise_approved": false, | |
| "quality_status": "imported_unreviewed", | |
| "revision": "corpus-befde1177fa13476703d89a8", | |
| "scope": "reference" | |
| } | |
| ], | |
| "operations_lock": { | |
| "AO01@0.1.0": "6f2a89d1624450c6e4afd8f776f23c7df4bf402976a82d0992dfd6cfdc643bf2", | |
| "AO02@0.1.0": "6a4491053f9a3f55d900f3f907f81a0cfc44f09a1e2f1e770248287bc0b8d7f6", | |
| "AO03@0.1.0": "8a1387e065674c2987930ad865a2bdb4ab7346cb589505c350c6bb1907a7eb6d", | |
| "AO04@0.1.0": "3ef3f1be1b0f9240f066fa6d0b3b1430026d55763d15b5fc584a801c64be688b", | |
| "AO05@0.1.0": "547372e5c1fa583da9b7f426a234e2c2a8388404ff1286d7c31051d2e81031dc", | |
| "AO06@0.1.0": "2b369879ba0cd2847c173cfb7cb583c1dc051553d3d3ea80f954c81c21f1f233", | |
| "AO07@0.1.0": "69e1e824b4c5129f62595ac3df578eec7b083411cd391a72d47303eec3843baa", | |
| "AO08@0.1.0": "1d75566610ac000990fd15b9fd18a6518de8af12a329b3c56d51ff29c0c30623", | |
| "AO09@0.1.0": "2e4bf4b3fcdfce184b8dea9ffebd18ffe91af7320b0ef3ce430edb3b5cc15c52", | |
| "AO10@0.1.0": "d05863bea57e94ad860696bd6ac85e072034f89f6f038f132c65b854dd366e9f", | |
| "AO11@0.1.0": "43b910a51da7a58810d3890eb2305d80663db6a1c187b51466f8e396a94956f0" | |
| }, | |
| "project_id": "equipment-demo", | |
| "release_digest": "dd4cf5672759103b64ca066ce15bc8fff9854556c075f388efee42d45226a686", | |
| "release_ref": "equipment-ops-java-development@local-dd4cf5672759103b", | |
| "snapshot_digest": "254f9b6c7dd6e382c0335580c44d8174fc2fc4ce4bb244ff225709f5b9b716d5", | |
| "snapshot_id": "snapshot-b1e160d882474330ac98c6c8b190d00e", | |
| "source_digest": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a", | |
| "tenant_id": "demo-tenant", | |
| "user_id": "local-example-builder" | |
| }, | |
| "source": { | |
| "files": { | |
| "src/main/java/demo/App.java": "package demo;\n\nimport com.sun.net.httpserver.HttpExchange;\nimport com.sun.net.httpserver.HttpServer;\nimport java.io.IOException;\nimport java.io.OutputStream;\nimport java.net.InetSocketAddress;\nimport java.nio.charset.StandardCharsets;\nimport java.time.LocalDate;\nimport java.util.*;\nimport java.util.regex.Pattern;\n\npublic class App {\n private static final String AUTH = \"Bearer demo-maintenance\";\n private static final Pattern ID_PAT = Pattern.compile(\"^[A-Z][A-Z0-9_-]{0,31}$\");\n private static final Map<String, Map<String, String>> orders = new HashMap<>();\n\n public static void main(String[] args) throws IOException {\n HttpServer server = HttpServer.create(new InetSocketAddress(8080), 0);\n server.setExecutor(null);\n server.createContext(\"/\", ex -> send(ex, 404, \"{\\\"error\\\":\\\"NOT_FOUND\\\"}\"));\n server.createContext(\"/health\", ex -> handle(ex, null));\n server.createContext(\"/api/work-orders/open\", ex -> handle(ex, \"open\"));\n server.createContext(\"/api/work-orders\", ex -> handle(ex, \"get\"));\n server.createContext(\"/api/work-orders/transition\", ex -> handle(ex, \"trans\"));\n server.createContext(\"/api/inspection/next\", ex -> handle(ex, \"insp\"));\n server.start();\n }\n\n private static Void handle(HttpExchange ex, String type) throws IOException {\n try {\n String path = ex.getRequestURI().getPath();\n Map<String, String> methods = Map.of(\"/health\", \"GET\", \"/api/work-orders\", \"GET\",\n \"/api/work-orders/open\", \"POST\", \"/api/work-orders/transition\", \"POST\", \"/api/inspection/next\", \"GET\");\n if (!methods.containsKey(path)) return send(ex, 404, \"{\\\"error\\\":\\\"NOT_FOUND\\\"}\");\n if (!methods.get(path).equals(ex.getRequestMethod())) return send(ex, 405, \"{\\\"error\\\":\\\"METHOD_NOT_ALLOWED\\\"}\");\n if (type == null) {\n if (!\"GET\".equals(ex.getRequestMethod())) return send(ex, 405, \"{\\\"error\\\":\\\"METHOD_NOT_ALLOWED\\\"}\");\n return send(ex, 200, \"{\\\"status\\\":\\\"ok\\\"}\");\n }\n String auth = ex.getRequestHeaders().getFirst(\"Authorization\");\n if (!AUTH.equals(auth)) return send(ex, 401, \"{\\\"error\\\":\\\"UNAUTHORIZED\\\"}\");\n \n Map<String, List<String>> params = parseQuery(ex.getRequestURI().getRawQuery());\n \n switch (type) {\n case \"open\":\n if (!\"POST\".equals(ex.getRequestMethod())) return send(ex, 405, \"{\\\"error\\\":\\\"METHOD_NOT_ALLOWED\\\"}\");\n if (!params.keySet().equals(Set.of(\"id\",\"device\"))) return send(ex, 400, \"{\\\"error\\\":\\\"INVALID_INPUT\\\"}\");\n String id = getOne(params, \"id\"), dev = getOne(params, \"device\");\n if (id == null || dev == null || !ID_PAT.matcher(id).matches() || !ID_PAT.matcher(dev).matches()) \n return send(ex, 400, \"{\\\"error\\\":\\\"INVALID_INPUT\\\"}\");\n synchronized (orders) {\n if (orders.containsKey(id)) return send(ex, 409, \"{\\\"error\\\":\\\"ORDER_EXISTS\\\"}\");\n orders.put(id, Map.of(\"id\", id, \"device\", dev, \"state\", \"OPEN\"));\n }\n return send(ex, 200, toJson(orders.get(id)));\n case \"get\":\n if (!\"GET\".equals(ex.getRequestMethod())) return send(ex, 405, \"{\\\"error\\\":\\\"METHOD_NOT_ALLOWED\\\"}\");\n if (!params.keySet().equals(Set.of(\"id\"))) return send(ex, 400, \"{\\\"error\\\":\\\"INVALID_INPUT\\\"}\");\n id = getOne(params, \"id\");\n if (id == null || !ID_PAT.matcher(id).matches()) return send(ex, 400, \"{\\\"error\\\":\\\"INVALID_INPUT\\\"}\");\n Map<String, String> o = orders.get(id);\n if (o == null) return send(ex, 404, \"{\\\"error\\\":\\\"ORDER_NOT_FOUND\\\"}\");\n return send(ex, 200, toJson(o));\n case \"trans\":\n if (!\"POST\".equals(ex.getRequestMethod())) return send(ex, 405, \"{\\\"error\\\":\\\"METHOD_NOT_ALLOWED\\\"}\");\n if (!params.keySet().equals(Set.of(\"id\",\"action\"))) return send(ex, 400, \"{\\\"error\\\":\\\"INVALID_INPUT\\\"}\");\n id = getOne(params, \"id\"); String act = getOne(params, \"action\");\n if (id == null || act == null || !ID_PAT.matcher(id).matches() || !Set.of(\"START\", \"CLOSE\").contains(act)) return send(ex, 400, \"{\\\"error\\\":\\\"INVALID_INPUT\\\"}\");\n synchronized (orders) {\n o = orders.get(id);\n if (o == null) return send(ex, 404, \"{\\\"error\\\":\\\"ORDER_NOT_FOUND\\\"}\");\n String st = o.get(\"state\");\n if (\"START\".equals(act)) {\n if (!\"OPEN\".equals(st)) return send(ex, 409, \"{\\\"error\\\":\\\"INVALID_TRANSITION\\\"}\");\n orders.put(id, Map.of(\"id\", id, \"device\", o.get(\"device\"), \"state\", \"IN_PROGRESS\"));\n } else if (\"CLOSE\".equals(act)) {\n if (!\"IN_PROGRESS\".equals(st)) return send(ex, 409, \"{\\\"error\\\":\\\"INVALID_TRANSITION\\\"}\");\n orders.put(id, Map.of(\"id\", id, \"device\", o.get(\"device\"), \"state\", \"CLOSED\"));\n } else return send(ex, 400, \"{\\\"error\\\":\\\"INVALID_INPUT\\\"}\");\n }\n return send(ex, 200, toJson(orders.get(id)));\n case \"insp\":\n if (!\"GET\".equals(ex.getRequestMethod())) return send(ex, 405, \"{\\\"error\\\":\\\"METHOD_NOT_ALLOWED\\\"}\");\n if (!params.keySet().equals(Set.of(\"last\",\"days\"))) return send(ex, 400, \"{\\\"error\\\":\\\"INVALID_INPUT\\\"}\");\n String lastStr = getOne(params, \"last\"), daysStr = getOne(params, \"days\");\n if (lastStr == null || daysStr == null || !lastStr.matches(\"[0-9]{4}-[0-9]{2}-[0-9]{2}\") || !daysStr.matches(\"[0-9]+\")) return send(ex, 400, \"{\\\"error\\\":\\\"INVALID_INPUT\\\"}\");\n try {\n LocalDate ld = LocalDate.parse(lastStr);\n int y = ld.getYear(); if (y < 2000 || y > 2100) throw new Exception();\n int d = Integer.parseInt(daysStr);\n if (d < 1 || d > 365) throw new Exception();\n return send(ex, 200, \"{\\\"next\\\":\\\"\" + ld.plusDays(d).toString() + \"\\\"}\");\n } catch (Exception e) { return send(ex, 400, \"{\\\"error\\\":\\\"INVALID_INPUT\\\"}\"); }\n }\n } catch (IllegalArgumentException e) { return send(ex, 400, \"{\\\"error\\\":\\\"INVALID_INPUT\\\"}\"); }\n return null;\n }\n\n private static Map<String, List<String>> parseQuery(String q) {\n Map<String, List<String>> m = new HashMap<>();\n if (q == null || q.isEmpty()) return m;\n for (String p : q.split(\"&\", -1)) {\n String[] kv = p.split(\"=\", 2);\n if (kv.length != 2 || kv[0].isEmpty() || kv[1].isEmpty()) throw new IllegalArgumentException();\n m.computeIfAbsent(kv[0], k -> new ArrayList<>()).add(kv[1]);\n }\n return m;\n }\n\n private static String getOne(Map<String, List<String>> p, String k) {\n List<String> l = p.get(k);\n if (l == null || l.size() != 1) return null;\n return l.get(0);\n }\n\n private static String toJson(Map<String, String> m) {\n StringBuilder sb = new StringBuilder(\"{\");\n boolean first = true;\n for (String k : new String[]{\"id\", \"device\", \"state\"}) {\n if (!first) sb.append(\",\");\n sb.append(\"\\\"\").append(k).append(\"\\\":\\\"\").append(m.get(k)).append(\"\\\"\");\n first = false;\n }\n return sb.append(\"}\").toString();\n }\n\n private static Void send(HttpExchange ex, int code, String body) throws IOException {\n byte[] b = body.getBytes(StandardCharsets.UTF_8);\n ex.getResponseHeaders().set(\"Content-Type\", \"application/json; charset=utf-8\");\n ex.sendResponseHeaders(code, b.length);\n try (OutputStream os = ex.getResponseBody()) { os.write(b); }\n return null;\n }\n}\n" | |
| }, | |
| "source_digest": "0ff92de11f74b87db8621ca7aa7b6ab7011a9b31896c582fe94e5a1e00006030" | |
| }, | |
| "status": "verified_pending_user_acceptance", | |
| "test": { | |
| "cases": 23, | |
| "classes_digest": "d192a049415721587bfe4c6d2fde3beb22e1cf2f907f72a20b59930a8213d24a", | |
| "config_digest": "b3954b40cfbd1ff2d72f434555b55587bf73a86af3d8ecf03a9da2572594955f", | |
| "container": "zk-run-223b16abf0914b9b9fd0945f89113209", | |
| "execution_mode": "qemu", | |
| "image": "zkcoding-qemu@sha256:66091b8b48c22addf6f7db9fdce2cc45ac71065239e696c1b41947d539c8a1b1", | |
| "isolation": { | |
| "disposable": true, | |
| "host_mounts": [], | |
| "memory_mb": 1024, | |
| "network": "none", | |
| "vcpu": 1 | |
| }, | |
| "passed": true, | |
| "passed_cases": 23, | |
| "preview_scope": "disposable-vm-loopback-http", | |
| "receipt_digest": "2a0625e675566344aeb29f836b8b34b1198457188512da1c333373e86996eddb", | |
| "receipt_ref": "run-223b16abf0914b9b9fd0945f89113209-8c5b06657c514f48b73e238fcaec9735", | |
| "source_digest": "0ff92de11f74b87db8621ca7aa7b6ab7011a9b31896c582fe94e5a1e00006030", | |
| "stage": "test", | |
| "suite_digest": "159acbe045b38ca5ee46036e1143dea75c5bd126066b09ead64165bdf629f2cc" | |
| } | |
| } | |
| } |