Repository navigation
Fix nine defects an independent bug hunt found and an adversarial checker reproduced on main dc694994: the credential check's token boundary, case-insensitive scope exclusions, actor identity by princ - #165
Conversation
…tring hunk, inside the contract's 30-file scope) SyberLabs-Thread: 5783eda8-3306-4e59-ae59-5fbe5e7de120 SyberLabs-Candidate: c3 SyberLabs-Provider: claude@fable-5.1
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8443275a8e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "request_digest": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, | ||
| "response_digest": {"type": "string", "pattern": "^[0-9a-f]{64}$"}, | ||
| "idempotency_key": {"type": "string", "minLength": 1}, | ||
| "destination": {"type": "string", "minLength": 1}, |
There was a problem hiding this comment.
Version this reconciliation proof change
When recovering a GitHub pull request after a lost response, the emitted proof now includes destination. A client still validating sdk.syberlabs.space/v0alpha1 against the prior schema will reject it because the proof disallows additional properties. Keep the frozen v0alpha1 wire shape or make this a versioned protocol change.
AGENTS.md reference: AGENTS.md:L24-L25
Useful? React with 👍 / 👎.
|
Scope: owner direction in session 2026-11-02 (SyberFactory, packet Packet What changed, defect by defect
Files (30): code Commands and results
Claim ceiling: implemented and tested (locally and on CI: Linux 3.11–3.13, Windows), against stand-ins. Not measured in a live run, not deployed. Known limitations
Unresolved questions
Next permissible packet: unchanged; the pilot freeze items (SW-01, 03, 04, 05, 07, 08, 10) were not touched. |
Independent verification of #165 (
|
| # | Repro | Result |
|---|---|---|
| INT-1 | task-ghp_…, disk-sk-ant-api03-…, see ask-AKIA…, key_sk-ant-api03-… through query_guard._credential and gate._secret_matches |
all blocked / flagged; helper returns prefixes only, never key material |
| INT-1 FP | risk-assessment, task-list-manager, disk-cleanup-tool, ask-anything-bot, flask-sqlalchemy-utils, mask-generation-model, task-pricing-run12345678 ask-ant-x + three more (helpdesk-ticket-router-20251102, ramdisk-loader-v2-build-12345678, key_rotation_policy_v3_2025) |
all pass, both sides |
| INT-1 hook | real launch python -I <abs>/syberlabs/query_guard.py <dir> via hook_command + hook_environment |
the four tokens exit 2 (rule: secret), benign queries exit 0: _beside("_patterns") resolves under -I |
| INT-2 | in_scope({"paths": ["."], "exclude": ["tests"]}, "Tests/conftest.py"), .SyberLabs/x, .GIT/config on this host (CASE_INSENSITIVE_PATHS=True) |
all False; with the flag forced False they are admitted, as documented for POSIX |
| INT-3 | test_server.Principals |
bot-2 commit of bot-1's proposal: 409 actor_mismatch; every actor bot-1; /api/me name bot, principal_id bot-2 |
| F1 | test_publish…response_is_lost |
receipt ref == github:acme/shop, proof destination, work_items opened #1, delivered unknown ("pull request open") |
| F2 | run_json, 200 KB payload, child sleeps 8 s, timeout 1 |
provider_timeout after 1.25 s (was provider_shape after 8 s) |
| F3 | child spawns a sleeping grandchild, timeout 2 | provider_timeout; grandchild gone at 2.4 s (test_checks.alive) |
| F4 | run_metrics with trusted=False, 2/2 passed |
hidden_parts_passed=None; trusted=True → 1.0; keys == spec.METRIC_NAMES (16 = 7 + 9) |
| F5 | spec.check with bogus_metric as primary + decision metric |
refused with the known-names list; evals/e5-single-vs-repair/spec.json still validates (0 errors), spec_digest == registration.spec_digest (7625340097b9…), spec.registered OK |
| F6 | report.decide with 10**400, -(10**400), inf, NaN, True, "0.5", None |
each Rejected('threshold_invalid'); 10**300 decides (holds=False); spec.check refuses 10**400 without OverflowError |
Tests and checks
test_query_guard test_eval_score test_eval_adversarial test_evolution test_server test_publish test_g6_bridge_mapping test_console test_gaps test_eval_core: Ran 224, OK (skipped=2, expected failures=4).test_providers test_claude_code: Ran 64, OK.python -m conformance.run:matched 23 golden traces(lost_ackunchanged).benchmarks/run_scenarios.py:11 replayed, exit 0, digestb41f7cbb…(unchanged).gh pr checks 165: all 12 pass (G2, G3, G4, G6, G8, G8 strict, compose, policy, test 3.11/3.12/3.13, windows).- Certificate
hunt-fixes-1-5783eda8.cert.jsonvsfactory-key-current.pub,--repo= fresh clone:signature ok ed25519 3312866a18;repository ok(base and result present, trees match, 30 paths and diff digest match,refs/heads/syberlabs/5783eda8at8443275a8e); journal skipped (no thread journal under a fresh clone's.syberlabs; the canon checkout lacks the result commit). The handoff's "journal ok 21/21" is from the factory's own working copy and is not independently re-checked here.
Pilot freeze
Confirmed untouched: no retry/back-off, base64/hex, reopened/pr_reopened, lookups_blocked, shard, prompt-builder or metric-source change anywhere in the diff; syberlabs/metrics.py, githits*, settlement not in the file list. query_guard.py hunks are tokenization only (_patterns.credential_prefixes: prefix not preceded by alnum, resume at start+1), no encoding detection. session.py:455-462 adds destination only inside the state == "applied" branch; the reopened case is not in this path.
Main interplay (trial merge onto main 8a5e21f)
- Conflict in
spec/GAPS.mdonly (Close the follow-ups from PR #155's verifier: refuse unscreened --bare lookups (MCP servers, WebSearch, WebFetch) unless an explicit recorded override is given, stop Git Bash rewriting launcher argume #162 and Fix nine defects an independent bug hunt found and an adversarial checker reproduced on main dc694994: the credential check's token boundary, case-insensitive scope exclusions, actor identity by princ #165 both append entry 65). Resolution: this PR's entry becomes 66; no file outside the entry references "65" or "65 (a)…(f)", so it is a one-token renumber (the sub-items are "(a)…(f)" inline). test_gapswould fail on an unresolved or duplicate-65 merge (numbering_problems: "65 is shared") and passes once renumbered (run on the resolved merge: OK).syberlabs/claude_code.py(Close the follow-ups from PR #155's verifier: refuse unscreened --bare lookups (MCP servers, WebSearch, WebFetch) unless an explicit recorded override is given, stop Git Bash rewriting launcher argume #162's 45-line hunks vs this PR's import +feed_stdinline),eval/spec.py,tests/test_claude_code.py,tests/test_eval_adversarial.pyauto-merge cleanly;py_compileOK;test_eval_adversarial.PreRegistration,test_claude_code.Timeout,test_query_guard,test_gapson the merged tree: 37 tests OK.
Findings
Low
syberlabs/_patterns.py:22-31credential_prefixesis quadratic on a whitespace-free run of key-class characters with glued prefixes. Each rejected start resumes one character on and the greedy[A-Za-z0-9_\-]{8,}re-consumes the rest of the run. Measured on"task-" * n: 48 KB 0.34 s, 97 KB 1.28 s, 195 KB 5.70 s (×4 per doubling; the oldfinditerpass was linear, <1 ms). The query guard is unaffected (max_chars400). The eval gate is:gate.py:445-448credential_observedreads every evidence file whole, uncapped (_evidence_files: every non-derived, non-binary file in the run folder), so a ~1 MB such run in evidence costs minutes and 10 MB hours of scoring. Fail-slow, not fail-open; nothing is missed. Suggest a(?<![A-Za-z0-9])lookbehind so onefinditerpass gives the same rule linearly, or a cap on the scanned bytes. Space-separated text (195 KB oftask-list) scans in 2 ms.syberlabs/evolution.py:142-143casefold()is wider than any filesystem's case rule._matches("STRASSE/x", "straße")isTrue; NTFS and APFS do not foldß→ss. Over-match only: exclusions fail closed,pathscan admit a distinct file. Edge case, non-ASCII scope entries only.
Informational
3. INT-3 count: 18 call sites in do_POST now pass actor (17 work.* + _preview); request_witness (server.py:372) is the 19th and keeps user["name"] as a trace label beside principal_id, compared nowhere (test_console pins ("lead", "person-1")). The handoff's "all 19" counts the one it names as the exception. No remaining user["name"] reaches a kernel comparison; /api/me (server.py:198) keeps the display name. GAPS 65(b): register_principal has no HTTP route and no product caller outside syberwork/core.py; the id/users.json-key collision needs the cell's administrator to pick a colliding id — configuration, not a client-reachable path.
4. INT-2 probe: _case_insensitive_filesystem(__file__) (evolution.py:76-85) is sound on POSIX (normcase is identity there, so a case-insensitive volume is detected only by the samefile probe, which is right). The known limit (65(a)) cuts both ways: a case-insensitive host with a case-sensitive repository directory (WSL, fsutil per-directory flag) over-includes (Tests/x admitted by paths: ["tests"]), not only under-excludes.
5. F2 feed_stdin (providers.py:213-226): BrokenPipeError ⊂ OSError, so the tuple is redundant but correct; on Windows the write to a dead child's pipe raised OSError and was swallowed (the 1.25 s repro). _stop ends with proc.wait(), so no zombie. A grandchild that inherits the stdin read end keeps the daemon writer, its pipe handle and the payload buffer alive past writer.join(5) until it exits (65(d)/(e) territory).
6. F3 lazy import: the cycle is real (checks.py:59 imports critic; critic.py:45 imports providers.model_usage); a top-level import in providers would break import syberlabs.providers first. claude_code.py importing checks._stop at top is fine because providers does not import checks at top.
7. syberwork/core.py is untouched (register_principal docstring unchanged); the actor rule is stated in builder_http.actor_of (builder_http.py:28-36) and docs/INDUSTRIAL_CELL.md.
Nothing refused during this check.
…(GAPS entry renumbered 65 -> 66) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
#165 added the optional proof.destination Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Objective: Fix nine defects an independent bug hunt found and an adversarial checker reproduced on main dc69499: the credential check's token boundary, case-insensitive scope exclusions, actor identity by principal id, a reconciled pull request's destination, provider stdin under the deadline with a tree kill, tampered hidden-check counts, unknown-metric specs and huge thresholds. Each fix carries its own regression test and one GAPS entry records what was closed and what remains.
Class: R
Agent-platform: claude@fable-5.1
Admitted-by: sykosyber
Reviewed-by: rules@2 (critic check critic.rules: high 0, medium 0, low 0)
Evidence: tested
Accepted in SyberLabs thread
5783eda8-3306-4e59-ae59-5fbe5e7de120as candidatec3(commit8443275a8eef0c60f7e7eb8eca9ae2965e53104b).Host checks on that tree: conformance passed, critic.rules passed, scenarios passed, tests passed.