From 5c9d7e7797187a5d116f68adb608e2c85c38e015 Mon Sep 17 00:00:00 2001 From: Seth Date: Mon, 2 Nov 2026 21:46:14 -0800 Subject: [PATCH 1/2] Delete more code no deployed app reaches: submit_witness, unused alias, orphan baselines syberlabs/session.py, syberwork/core.py: submit_witness (only a test called it; the console's request_witness is the live path). The external witness test calls the client directly. syberwork/static/app.js: the console sentence that told scripts to call it syberlabs/query_guard.py: the CREDENTIAL alias conformance/baseline: nothing reads these files docs: a note on pages that name removed code Co-Authored-By: Claude Opus 5.5 --- conformance/baseline/case_study_traces.json | 100 -------------------- conformance/baseline/unittest.txt | 32 ------- docs/ADVERSARIAL_BENCHMARK.md | 2 + docs/AUTOSKILL.md | 2 + docs/BUILD_THREAD.md | 2 + docs/CLAUDE_CODE.md | 2 + docs/CRITIC.md | 2 + docs/E3_BENCHMARK_PLAN.md | 2 + docs/EVAL.md | 2 + docs/EVOLUTION.md | 2 + docs/EXPERIMENTS.md | 2 + docs/GITHITS.md | 2 + docs/PAID_PROBLEM.md | 2 + docs/ROADMAP_STATUS.md | 2 + docs/SDK_FEEDBACK.md | 2 + docs/SDK_REDTEAM.md | 2 + docs/console/NOTES.md | 2 + syberlabs/query_guard.py | 4 +- syberlabs/session.py | 8 -- syberwork/core.py | 8 -- syberwork/static/app.js | 2 +- tests/test_external_witness.py | 4 +- tests/test_query_guard.py | 1 - 23 files changed, 35 insertions(+), 154 deletions(-) delete mode 100644 conformance/baseline/case_study_traces.json delete mode 100644 conformance/baseline/unittest.txt diff --git a/conformance/baseline/case_study_traces.json b/conformance/baseline/case_study_traces.json deleted file mode 100644 index 28af71a2..00000000 --- a/conformance/baseline/case_study_traces.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "command": "PYTHONPATH=. python3 -m case_studies.enterprise_procurement", - "commit": "a2f909bc4c638e07c9ae14cb8dc63f7c3347c06d", - "note": "Normalized from conformance capture on main. Raw case-study JSON also contains UUIDs, timestamps, and hashes, which are omitted here.", - "scenarios": [ - { - "decisions": [ - "all_checks_passed", - "resolution_open:quote", - "approval_required:manager" - ], - "event_count": 22, - "id": "ambiguous_quote", - "outcome": "resolved_quote" - }, - { - "decisions": [ - "all_checks_passed", - "approval_required:manager", - "approval_required:manager" - ], - "event_count": 16, - "id": "complete", - "outcome": "complete" - }, - { - "decisions": [ - "all_checks_passed", - "approval_required:manager", - "effect_unresolved:issue_order" - ], - "event_count": 17, - "id": "forged_claim", - "outcome": "blocked_unproven_claim" - }, - { - "decisions": [ - "all_checks_passed", - "approval_required:manager" - ], - "event_count": 16, - "id": "lost_ack", - "outcome": "reconciled_complete" - }, - { - "decisions": [ - "all_checks_passed", - "approval_required:manager" - ], - "event_count": 16, - "id": "mismatched_status", - "outcome": "blocked_mismatched_record" - }, - { - "decisions": [], - "event_count": 0, - "id": "missing_input", - "outcome": "input_rejected" - }, - { - "decisions": [ - "resolution_open:site", - "all_checks_passed", - "approval_required:manager" - ], - "event_count": 23, - "id": "missing_site", - "outcome": "resolved_site" - }, - { - "decisions": [ - "all_checks_passed", - "approval_required:manager", - "action_not_in_global_policy" - ], - "event_count": 13, - "id": "policy_tightened", - "outcome": "blocked_at_commit" - }, - { - "decisions": [ - "all_checks_passed", - "resolution_open:quote" - ], - "event_count": 13, - "id": "quote_cancelled", - "outcome": "cancelled" - }, - { - "decisions": [ - "all_checks_passed", - "approval_required:manager", - "approval_required:manager" - ], - "event_count": 21, - "id": "stale_quote", - "outcome": "recovered_after_refresh" - } - ] -} diff --git a/conformance/baseline/unittest.txt b/conformance/baseline/unittest.txt deleted file mode 100644 index e4245d2e..00000000 --- a/conformance/baseline/unittest.txt +++ /dev/null @@ -1,32 +0,0 @@ -test_ten_isolated_scenarios_close_or_cancel_authoritatively (test_enterprise_case_study.EnterpriseProcurementStudy.test_ten_isolated_scenarios_close_or_cancel_authoritatively) ... ok -test_declared_no_write_precondition_failure_allows_fresh_proposal (test_reconciliation.VerifiedExternalOutcome.test_declared_no_write_precondition_failure_allows_fresh_proposal) ... ok -test_legacy_unverified_reconciliation_never_satisfies_acceptance (test_reconciliation.VerifiedExternalOutcome.test_legacy_unverified_reconciliation_never_satisfies_acceptance) ... ok -test_matching_status_lookup_completes_only_after_signoff (test_reconciliation.VerifiedExternalOutcome.test_matching_status_lookup_completes_only_after_signoff) ... ok -test_mismatched_external_record_never_counts_as_proof (test_reconciliation.VerifiedExternalOutcome.test_mismatched_external_record_never_counts_as_proof) ... ok -test_not_found_is_pending_and_blocks_new_effect (test_reconciliation.VerifiedExternalOutcome.test_not_found_is_pending_and_blocks_new_effect) ... ok -test_status_lookup_is_bound_to_the_action_origin (test_reconciliation.VerifiedExternalOutcome.test_status_lookup_is_bound_to_the_action_origin) ... ok -test_text_claim_cannot_complete_order (test_reconciliation.VerifiedExternalOutcome.test_text_claim_cannot_complete_order) ... ok -test_escalation_and_explicit_cancellation_are_terminal (test_resolution.AuthoritativeResolution.test_escalation_and_explicit_cancellation_are_terminal) ... ok -test_open_site_task_blocks_review_even_after_source_changes (test_resolution.AuthoritativeResolution.test_open_site_task_blocks_review_even_after_source_changes) ... ok -test_quote_choice_is_source_backed_and_case_bound (test_resolution.AuthoritativeResolution.test_quote_choice_is_source_backed_and_case_bound) ... ok -test_site_task_needs_authoritative_choice_and_owner (test_resolution.AuthoritativeResolution.test_site_task_needs_authoritative_choice_and_owner) ... ok -test_task_evidence_must_belong_to_case_input (test_resolution.AuthoritativeResolution.test_task_evidence_must_belong_to_case_input) ... ok -test_admission_rechecks_source_and_policy_at_commit (test_work.WorkFlow.test_admission_rechecks_source_and_policy_at_commit) ... ok -test_case_input_must_match_verified_fact_when_contract_binds_it (test_work.WorkFlow.test_case_input_must_match_verified_fact_when_contract_binds_it) ... ok -test_competing_commits_claim_effect_once (test_work.WorkFlow.test_competing_commits_claim_effect_once) ... ok -test_compiled_path_uses_observed_values_without_model_inference (test_work.WorkFlow.test_compiled_path_uses_observed_values_without_model_inference) ... ok -test_complete_case_and_separate_approval (test_work.WorkFlow.test_complete_case_and_separate_approval) ... ok -test_contract_compiles_path_and_rejects_cycles (test_work.WorkFlow.test_contract_compiles_path_and_rejects_cycles) ... ok -test_denies_untrusted_and_inferred_facts (test_work.WorkFlow.test_denies_untrusted_and_inferred_facts) ... ok -test_global_approval_cannot_be_overridden_by_contract (test_work.WorkFlow.test_global_approval_cannot_be_overridden_by_contract) ... ok -test_global_policy_restriction_overrides_local_contract (test_work.WorkFlow.test_global_policy_restriction_overrides_local_contract) ... ok -test_manual_source_assertion_cannot_substitute_for_connector_read (test_work.WorkFlow.test_manual_source_assertion_cannot_substitute_for_connector_read) ... ok -test_planner_output_is_only_a_proposal (test_work.WorkFlow.test_planner_output_is_only_a_proposal) ... ok -test_real_http_read_and_effect_with_idempotency_key (test_work.WorkFlow.test_real_http_read_and_effect_with_idempotency_key) ... ok -test_replay_amendment_and_original_immutability (test_work.WorkFlow.test_replay_amendment_and_original_immutability) ... ok -test_tamper_detection (test_work.WorkFlow.test_tamper_detection) ... ok - ----------------------------------------------------------------------- -Ran 27 tests in 16.475s - -OK diff --git a/docs/ADVERSARIAL_BENCHMARK.md b/docs/ADVERSARIAL_BENCHMARK.md index 2fa9bce2..e63d429c 100644 --- a/docs/ADVERSARIAL_BENCHMARK.md +++ b/docs/ADVERSARIAL_BENCHMARK.md @@ -1,5 +1,7 @@ # Adversarial payment +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + Status: **measured on this simulation**. Not a customer. Not a run of OPA, Cedar, Temporal, LangGraph, or any other named product. The problem is one bank balance of 10000 and two invoices. `INV-LIVE` is 4000 and fresh. `INV-STALE` is 8000 and expired. The bank debits and then drops the HTTP response. A second attempt with a new idempotency key charges the account again. diff --git a/docs/AUTOSKILL.md b/docs/AUTOSKILL.md index 6babc439..c53202c6 100644 --- a/docs/AUTOSKILL.md +++ b/docs/AUTOSKILL.md @@ -1,5 +1,7 @@ # AutoSkill +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + AutoSkill chooses at most one certified skill for an agent turn. Jev ranks the catalog. Ordinary code decides whether that ranking is allowed to reach the agent. A selection names a document. It does not authorize a tool, a file write, or a network call. The catalog this design is built against is the skill tree in Everything Claude Code (ECC), the harness performance system published by the Anthropic x Forum Ventures hackathon winner. The screenshot under design shows that tree: a `skills/` directory of workflow documents (`tdd-workflow`, `verification-loop`, `security-review`), language and framework quartets (`django-patterns`, `django-security`, `django-tdd`, `django-verification`, and the same shape for Laravel, Spring Boot, and Quarkus), and cross-cutting procedures (`search-first`, `skill-stocktake`, `eval-harness`). ECC's own READMEs have quoted 56, 156, and 286 skills as the tree grew. AutoSkill pins one commit and one manifest. It does not follow a moving "latest". diff --git a/docs/BUILD_THREAD.md b/docs/BUILD_THREAD.md index 9b6ccc96..0a2362eb 100644 --- a/docs/BUILD_THREAD.md +++ b/docs/BUILD_THREAD.md @@ -1,5 +1,7 @@ # Build Thread +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + A Build Thread is one governed change to one local Git repository. It shows why a candidate was accepted or refused, what it changed, and what actually happened. It can be resumed from its record after a crash. It needs Python 3.11+ and `git`, and no account, model, or network. ## Ten minutes diff --git a/docs/CLAUDE_CODE.md b/docs/CLAUDE_CODE.md index 551d9376..15119946 100644 --- a/docs/CLAUDE_CODE.md +++ b/docs/CLAUDE_CODE.md @@ -1,5 +1,7 @@ # Claude Code as a proposer +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + ```bash syberlabs propose --claude-code --trusted-tree # your own Claude Code login (subscription_local) syberlabs propose --claude-code --bare # ANTHROPIC_API_KEY in your environment (api) diff --git a/docs/CRITIC.md b/docs/CRITIC.md index 18c3e6d0..e02b1ed0 100644 --- a/docs/CRITIC.md +++ b/docs/CRITIC.md @@ -1,5 +1,7 @@ # The critic station +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + An independent reviewer runs as a host check on every candidate, its findings are recorded in the thread's hash chain, an admission rule refuses acceptance while a high finding stands, and the pull request's `Reviewed-by` line is written from that record. The review is evidence a verifier can re-read, not a comment someone remembers. ## A critic is a check with a schema diff --git a/docs/E3_BENCHMARK_PLAN.md b/docs/E3_BENCHMARK_PLAN.md index d5c5977f..a90c6582 100644 --- a/docs/E3_BENCHMARK_PLAN.md +++ b/docs/E3_BENCHMARK_PLAN.md @@ -1,5 +1,7 @@ # E3: the comparison benchmark against a real model (plan) +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + Status: **pilot run 2026-10-21, see `docs/MODEL_COMPARISON.md`** (uninformative by the rule below; the full run was not started). **Fixtures v2 added 2026-10-21, unrun** (section below). Budget cap: **$50**, with a 30% margin, so the planned worst case must stay under **$38.46**. ## What E3 is diff --git a/docs/EVAL.md b/docs/EVAL.md index 8d2edee0..a75be679 100644 --- a/docs/EVAL.md +++ b/docs/EVAL.md @@ -1,5 +1,7 @@ # SyberEval: pre-registered evaluations through the real Build Thread +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + SyberEval measures SyberWork's agents as governed workflows. It asks whether a provider configuration, run through the real Build Thread, produces admitted changes that are correct, safe and cheap. This page covers specs, tasks, arms, the runner and its evidence bundles, the preflight gate, how much of a hidden check reaches the proposer (`hidden_feedback`), the spend ledger, the safety gate, the scorer and the report (package `syberlabs/eval/`). The agent-facing safety tasks are not here yet (`spec/GAPS.md`, 62). The E3 harness (`benchmarks/model_vs_patch.py`, [MODEL_COMPARISON.md](MODEL_COMPARISON.md)) is still the tool for quick research. SyberEval is the instrument whose numbers are published. ## Principles diff --git a/docs/EVOLUTION.md b/docs/EVOLUTION.md index 9ab1a126..10028f5f 100644 --- a/docs/EVOLUTION.md +++ b/docs/EVOLUTION.md @@ -1,5 +1,7 @@ # Candidates and search providers +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + SyberWork is the authority and evidence layer. A search provider is an artifact-search layer: it proposes changes. The provider can be a person's patch, a model adapter, or an EvoGit-style evolutionary search. Its output is **provisional** until the same contract, evidence, policy, and approval gates that govern every other SyberWork action admit it. > Lineage is provenance, not evidence of superiority. diff --git a/docs/EXPERIMENTS.md b/docs/EXPERIMENTS.md index a8b584a0..734a8517 100644 --- a/docs/EXPERIMENTS.md +++ b/docs/EXPERIMENTS.md @@ -1,5 +1,7 @@ # Experiments: two arms compared from the journal +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + ```bash syberlabs experiment label --name githits-pilot --item LIB-1 --arm off --tag needs_lookup # right after start syberlabs experiment report --name githits-pilot # the arms compared, with every check that applies diff --git a/docs/GITHITS.md b/docs/GITHITS.md index 8bf4d748..4bac0a19 100644 --- a/docs/GITHITS.md +++ b/docs/GITHITS.md @@ -1,5 +1,7 @@ # GitHits API client +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + ```bash export GITHITS_API_TOKEN=... # from the environment only; never in a file in this repository syberlabs githits search "retry with backoff" --target pypi:urllib3@2.2.1 --source code diff --git a/docs/PAID_PROBLEM.md b/docs/PAID_PROBLEM.md index e845b8b2..b2295200 100644 --- a/docs/PAID_PROBLEM.md +++ b/docs/PAID_PROBLEM.md @@ -1,5 +1,7 @@ # Plan: a company pays because SyberWork solved a problem it has +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + Status: **rehearsal implemented**. Gates 0, 2, 3, and 4 are not implemented. They need a real workflow, a price, a license choice, and a pilot cell. This document still names no customer. **Goal.** A company that is not SyberLabs pays money, and the reason they state is a problem whose failure mode SyberWork's recorded behavior prevented. A payment for a roadmap, a workshop, or "an AI coding platform" does not meet the goal. diff --git a/docs/ROADMAP_STATUS.md b/docs/ROADMAP_STATUS.md index 6313a896..f274db3f 100644 --- a/docs/ROADMAP_STATUS.md +++ b/docs/ROADMAP_STATUS.md @@ -1,5 +1,7 @@ # Roadmap status +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + This file tracks the next-stage roadmap (27 September 2026) against what the repository actually does. Each row says whether a claim is **implemented** (code and tests in this repository), **measured** (a number from a named run), or **proposed** (not built). A passing unit test is not evidence that a developer outside SyberLabs can use the kit. ## Gate 0 — integrate the foundation diff --git a/docs/SDK_FEEDBACK.md b/docs/SDK_FEEDBACK.md index 847dcf03..cfa5e6e5 100644 --- a/docs/SDK_FEEDBACK.md +++ b/docs/SDK_FEEDBACK.md @@ -1,5 +1,7 @@ # Development feedback and framework comparison +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + This note is from building a second project, `examples/access_review.py`, on `syberlabs.Session` and from the numbers in `benchmarks/results/dev-session.txt`. It is not a market survey. The comparisons are capability comparisons, not speed claims against those projects. ## What a new project actually does diff --git a/docs/SDK_REDTEAM.md b/docs/SDK_REDTEAM.md index ac67569e..011e7a38 100644 --- a/docs/SDK_REDTEAM.md +++ b/docs/SDK_REDTEAM.md @@ -1,5 +1,7 @@ # Research and red team: closing the standards gap +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + Date of this pass: 2026-09-27. The question is not "which product should replace this SDK". It is which properties the leading standards already require, where this repository fails them, and which change closes each gap without pretending the SDK is something else. Standards used, and why: diff --git a/docs/console/NOTES.md b/docs/console/NOTES.md index 8acb3eb0..d654c1e0 100644 --- a/docs/console/NOTES.md +++ b/docs/console/NOTES.md @@ -1,5 +1,7 @@ # Operator console: UI walkthrough +> Some code this page names may have been removed as dead code. `git log -S` finds where it last lived. + The browser console served by `syberwork serve` at `http://127.0.0.1:8766/`. It is a client of the existing case API in `syberwork/server.py`. Every button calls a route that already existed before this change, except for the read-only routes listed under "Routes added". The server stays the diff --git a/syberlabs/query_guard.py b/syberlabs/query_guard.py index a925bb9e..07dd93a6 100644 --- a/syberlabs/query_guard.py +++ b/syberlabs/query_guard.py @@ -96,9 +96,9 @@ def _beside(name: str): canonical = _beside("canonical").canonical _patterns = _beside("_patterns") - CREDENTIAL, credential_prefixes = _patterns.SECRET, _patterns.credential_prefixes + credential_prefixes = _patterns.credential_prefixes else: - from syberlabs._patterns import SECRET as CREDENTIAL, credential_prefixes # one credential pattern set, shared + from syberlabs._patterns import credential_prefixes # one credential pattern set, shared from syberlabs.canonical import canonical VERSION = "2" diff --git a/syberlabs/session.py b/syberlabs/session.py index fe310f90..1c888717 100644 --- a/syberlabs/session.py +++ b/syberlabs/session.py @@ -632,14 +632,6 @@ def verify_chain(self, case_id: str) -> bool: return False return _side_matches(events, self._side.get(case_id, {})) - def submit_witness(self, case_id: str, client) -> dict: - """Ask an external witness to sign this case. This session has no signing seed.""" - with self._lock: - if not self.verify_chain(case_id): - raise Rejected("invalid_chain", "case history does not verify") - events = json.loads(json.dumps(self.events[case_id])) - return client.submit(events) - @_guard def side_channel(self, case_id: str) -> list[dict]: """JCS digest and deciding rule id for each event. Neither is in the event hash.""" diff --git a/syberwork/core.py b/syberwork/core.py index 5fbd8f83..49af68a3 100644 --- a/syberwork/core.py +++ b/syberwork/core.py @@ -937,14 +937,6 @@ def replay(self, case_id: str, contract_version: int, policy_version: int) -> di "acceptance_after": self._acceptance(contract, events), "note": "Counterfactual against captured case events; does not re-read or mutate external systems"} - def submit_witness(self, case_id: str, client) -> dict: - """Ask an external witness to sign this case. This store has no signing seed.""" - if not self.verify_chain(case_id): - raise Rejected("invalid_chain", "case history does not verify") - with self.tx() as db: - events = self._events(db, case_id) - return client.submit(events) - def witness_status(self, case_id: str, log) -> dict: """What a read-only transparency log says about this case's history. Appends nothing, signs nothing. diff --git a/syberwork/static/app.js b/syberwork/static/app.js index 16953bbb..8f3d6c43 100644 --- a/syberwork/static/app.js +++ b/syberwork/static/app.js @@ -1015,7 +1015,7 @@ function witnessSummary(entry, info) { if (entry.error) return [readFailed(entry), witnessAsk(null, info)]; const v = entry.witness; const signs = h('p', {class: 'hint'}, 'Verify history is the server recomputing its own chain. A witness is another process holding its own key: it signs a chain head (', mono('python -m syberlabs.witness'), - ') and appends it to its log. ', h('b', {}, 'Ask witness to sign'), ' has serve check the log, then send it this history (', mono('Work.request_witness'), '). A script can call ', mono('Work.submit_witness'), ' directly, without that check.'); + ') and appends it to its log. ', h('b', {}, 'Ask witness to sign'), ' has serve check the log, then send it this history (', mono('Work.request_witness'), ').'); if (v.state === 'off') return [h('p', {}, badge('idle', 'not configured'), ' ', h('span', {class: 'why'}, v.text)), h('p', {class: 'hint'}, 'Nothing on this page is witnessed.'), witnessAsk(v, info), signs]; if (v.state === 'unknown') return [badge('unknown', 'unknown'), ' ', h('span', {class: 'why'}, v.text), witnessAsk(v, info)]; diff --git a/tests/test_external_witness.py b/tests/test_external_witness.py index 60739508..3db56970 100644 --- a/tests/test_external_witness.py +++ b/tests/test_external_witness.py @@ -59,7 +59,7 @@ def test_witness_process_signs_and_the_case_writer_cannot_append(self): _install_note(session) case_id = session.create_case("note", 1, {"name": "a"}, "operator") events = session.inspect(case_id)["events"] - envelope = session.submit_witness(case_id, client) + envelope = client.submit(events) self.assertNotIn(envelope["signatures"][0]["sig"], json.dumps(events)) broken = json.loads(json.dumps(events)) broken[0]["body"] = {"rewritten": True} @@ -71,7 +71,7 @@ def test_witness_process_signs_and_the_case_writer_cannot_append(self): work = Work(work_db) _install_note(work) work_case = work.create_case("note", 1, {"name": "b"}, "operator") - recorded = work.submit_witness(work_case, client) + recorded = client.submit(work.inspect(work_case)["events"]) stored = json.dumps(work.inspect(work_case)["events"]) self.assertNotIn(recorded["signatures"][0]["sig"], stored) self.assertTrue(work.verify_chain(work_case)) diff --git a/tests/test_query_guard.py b/tests/test_query_guard.py index 0b2bbdbb..79dd5b8e 100644 --- a/tests/test_query_guard.py +++ b/tests/test_query_guard.py @@ -400,7 +400,6 @@ def test_the_hook_loads_two_leaf_modules_and_not_the_package(self): self.assertTrue(guard.authentic(decision, KEY), "the hook's canonical JSON is the host's") def test_one_credential_pattern_object_and_the_same_policy(self): - self.assertIs(guard.CREDENTIAL, _patterns.SECRET) self.assertIs(metrics._SECRET, _patterns.SECRET) self.assertEqual(_patterns.SECRET.pattern, r"(ghp_|gho_|ghs_|github_pat_|sk-ant-|sk-|xox[abprs]-|AKIA)[A-Za-z0-9_\-]{8,}") From eb25f38690c6d818f0f9fe32256f8009b166bf6e Mon Sep 17 00:00:00 2001 From: Seth Date: Mon, 2 Nov 2026 21:51:16 -0800 Subject: [PATCH 2/2] Correct the docs that still present submit_witness as available Co-Authored-By: Claude Opus 5.5 --- docs/SDK_REDTEAM.md | 2 +- docs/console/NOTES.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/SDK_REDTEAM.md b/docs/SDK_REDTEAM.md index 011e7a38..9b5be9e5 100644 --- a/docs/SDK_REDTEAM.md +++ b/docs/SDK_REDTEAM.md @@ -133,7 +133,7 @@ The chain link is still `canonical`. Histories from `main` (`a2f909b`) keep veri | 1 | Closed for the listed checks | Non-finite amounts are `amount_required`. Input kinds other than `string` and `integer` are `invalid_contract` at publish and `input_schema` at create. An `effect_started` with no `effect_succeeded`, `effect_rejected`, or verified reconciliation occupies the action as `effect_unresolved:`. `effect_rejected` still allows a fresh proposal. `effect_unknown.error` and `source_unavailable` detail are codes (`destination_http`, `destination_unreachable`, `destination_error`, or `Rejected.code`), not exception text. | | 2 | Closed for binding and the connection | `bind_arguments` and `next_compiled` are shared. `Work` keeps one SQLite connection and a lock. `Session` uses a re-entrant lock. HTTP execution stays on `Work`. | | 3 | Closed, with integer `at` on new events only | New events store a JCS SHA-256 of the hashed fields on `event_side` / `Session.side_channel`. `verify_chain` checks that digest when a row has one. Old rows have none and still verify. The deciding rule id is on that side record. `cloudevent` exports CloudEvents 1.0. `conformance/jcs_vectors.json` is the byte vector. New `at` values are integer microseconds and are inside `event_digest`. Float-second rows, including the `main` fixture, are not rewritten. `at_json` preserves the integer across SQLite `REAL`. | -| 4 | Public key, local log, separate witness process | `witness` remains HMAC-SHA256 over canonical `{case_id, count, head}`. `sign_chain_head` is an Ed25519 DSSE envelope over the same object. The signature is not an event. `python -m syberlabs.witness` keeps the seed, rechecks the chain, and appends to the log. `Session.submit_witness` and `Work.submit_witness` send the events and keep only the public key. The case writer opens the log read-only. **KNOWN** limits: the pure-Python Ed25519 is not constant-time; a same-user process can still open the log file writable; an operator who holds the seed can rebuild the log. This is not Sigstore Rekor. | +| 4 | Public key, local log, separate witness process | `witness` remains HMAC-SHA256 over canonical `{case_id, count, head}`. `sign_chain_head` is an Ed25519 DSSE envelope over the same object. The signature is not an event. `python -m syberlabs.witness` keeps the seed, rechecks the chain, and appends to the log. `WitnessClient.submit` sends the events and the caller keeps only the public key. The case writer opens the log read-only. **KNOWN** limits: the pure-Python Ed25519 is not constant-time; a same-user process can still open the log file writable; an operator who holds the seed can rebuild the log. This is not Sigstore Rekor. | | 5 | Closed | The planner context is `objective`, `allowed_actions`, `arguments`, `required_facts`, and acceptance `{id, passed}`. Fact values are not included. A signoff is refused when that role's `after_action` effect has completed and the signer started it. A signoff before that effect still records; acceptance still fails. | HTTPS install now rejects non-public addresses and special-use names. `guard_request` rejects an HTTPS name that resolves to a non-public address before the request. `SYBERWORK_HTTPS_HOSTS`, when set, is an additional hostname list. Unset, public HTTPS names stay allowed. Loopback HTTP remains `127.0.0.1` with an explicit port. diff --git a/docs/console/NOTES.md b/docs/console/NOTES.md index d654c1e0..9cc5d81a 100644 --- a/docs/console/NOTES.md +++ b/docs/console/NOTES.md @@ -65,7 +65,7 @@ tab or choose **Forget all** to drop them. | 8 | scheduler | **Execute** (press twice) | A real POST to the reference system with `Idempotency-Key` and `If-Match`; *Applied · destination acknowledged HTTP 201*. Only the original proposer can execute; anyone else gets *only the original proposer (scheduler) may execute* with a switch link. | | 9 | manager | **Sign off as manager** | The sign-off is offered only after `issue_order` has applied, because the server accepts an earlier signature but it never satisfies the clause. The case becomes *Complete*. | | 10 | any | History (`5`), then `v` | The server's `/verify` result is recorded with the head it covered (`intact through #13 …`). It is marked stale when newer events arrive. | -| 11 | manager | History → Witness → **Ask witness to sign** (press twice) | Before: *not witnessed*. Another credential sees the button disabled with *manager role required to ask the witness* and **⇄ switch to manager** (the role is `SYBERWORK_WITNESS_ROLE`). The armed note says the witness appends a leaf that cannot be removed and nothing is written to the case. After: *Witness signed #1–#13*, the panel reads *witnessed through #13* with the leaf, its signed head and *in the log*, and the button is disabled: *a signed head in the log already covers #1–#13*. An event added later is listed as *not witnessed*, and asking again signs the longer history. Without a configured log, **Witness** reads *not configured* and names the variables; a script can still call `Work.submit_witness`. | +| 11 | manager | History → Witness → **Ask witness to sign** (press twice) | Before: *not witnessed*. Another credential sees the button disabled with *manager role required to ask the witness* and **⇄ switch to manager** (the role is `SYBERWORK_WITNESS_ROLE`). The armed note says the witness appends a leaf that cannot be removed and nothing is written to the case. After: *Witness signed #1–#13*, the panel reads *witnessed through #13* with the leaf, its signed head and *in the log*, and the button is disabled: *a signed head in the log already covers #1–#13*. An event added later is listed as *not witnessed*, and asking again signs the longer history. Without a configured log, **Witness** reads *not configured* and names the variables. | If the destination is down at step 8, the effect becomes *Outcome unknown · check destination*, the case list shows *effect unknown*, and the next move is a manager's **Check destination status**. A 404 @@ -332,7 +332,7 @@ Gaps from #95, closed or still open: the log's newest checkpoint covers it. `witness_unavailable` replaces a `500` in three cases, each with its own detail: nothing listens on the port; the answer is unreadable; or no answer came within the client's 30 s. In the last case the witness may still have signed, and the detail says to read the log again (the - console does). `Work.submit_witness` is unchanged and still serves scripts. Requests run one at a time in a process, so four + console does). `Work.submit_witness` has since been removed. Requests run one at a time in a process, so four presses at once append one head (`test_presses_at_once_append_one_head`). Two `serve` processes over one database could still both append the same head; that costs a duplicate leaf, not a wrong verdict. - **Nothing is written to the case.** The test compares a full dump of the case database before and after. The