Repository navigation
Fix 11 acceptance failures and restore the ratified spec bytes - #66
Conversation
|
@adaptcom review |
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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: f958cf31d0
ℹ️ 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".
There was a problem hiding this comment.
Confidence Score: 4/5
Summary
Two incremental commits over the previously reviewed head: every read phase of a Company answer now reports a spent budget, and non-blocking conflicts with a question are skipped so each open conflict is asked once. Cargo and 28 acceptance nodes pass.
Important Files Changed
| File | Overview |
|---|---|
| crates/kinbase/src/http.rs | read_failure helper flags timeouts in status, header and body reads; stall test |
| crates/kinbase/src/projector.rs | questions_to_raise skips already-asked non-blocking Unknowns; unit test |
| crates/kinbase/src/questions.rs | decision_asked_for now used only as an asked predicate |
| spec/architecture.md | Restored to pre-#24 bytes; manifest digest verified |
| spec/verification.md | Restored to pre-#24 bytes; manifest digest verified |
| spec/cli.md | Restored to pre-#24 bytes; manifest digest verified |
| spec/amendment-005-managed-deployment-bind.md | #24's text carried verbatim as a candidate overlay |
| spec/amendment-006-kinbase-config-filename.md | Records the .kin/kinbase.toml rename |
| .github/workflows/release.yml | Comment no longer names the deployment |
| crates/kinbase/src/codebase.rs | Malformed kinbase bytes at .kin/config refuse with exit 5 |
| crates/kinbase/src/cli.rs | Omitted --as-of returns the recorded proof clock |
| crates/kinbase/src/company/client.rs | Process-wide skip of an endpoint after a real read timeout |
| crates/kinbase/src/lifecycle.rs | Agent attribution from trailers/identity; refs inherit provenance; exports one clock |
| crates/kinbase/src/session.rs | Role-gated id adoption; Company-last admission; nonce re-read under lock |
| crates/kinbase/src/private.rs | Tolerates losing the quarantine identity column race |
| crates/kinbase/src/corpus.rs | Uses shared observation_standing |
| crates/kinbase/src/ingest.rs | Ingest result reports provenance and standing |
| crates/kinbase/src/model.rs | New observation_standing helper |
| crates/kinbase/tests/hook_host_protocol.rs | Transcript-copy dedup test with assistant echo; passes |
| CHANGELOG.md | Unreleased lists all behaviour changes |
Findings
crates/kinbase/src/projector.rs:738— A blocking Unknown whose question already exists (any architecture-scoped one blocks regardless of decision) still returns its id and breaks, so conflicts behind it are never asked; break only on a newly appended question.crates/kinbase/src/projector.rs:732— Skipping an awaiting_authority non-blocking conflict bypasses ensure_question's registry-repair branch; onlyquestions deliverupgrades it now. Either accept and document, or skip only open/asked/closed.crates/kinbase/src/projector.rs:731— already_asked calls decision_asked_for per Unknown, each a full read of questions.jsonl; build one set of asked unknown_ids from latest_questions before the stage.crates/kinbase/src/http.rs:707— Doc says every phase "waits on the same read budget", but the first fixed-length branch's message is still "truncated" for a timeout; consider "did not finish within the read budget" when timeout_observed.
Reviewed c5f0cb8...398a37f · ↻ Re-run review · View in Adapt
…nt 005 PR #24 edited architecture.md, verification.md and cli.md in place, so their digests stopped matching ratification-manifest.json and every acceptance run refused with INVALID_HARNESS. The three files go back to their ratified bytes; the same text, verbatim, becomes candidate amendment 005. The allow_non_loopback behaviour itself is unchanged. Spec: amendment-005-managed-deployment-bind.md (candidate)
A `.kin/config` that names the kinbase-repo schema but carries malformed
bytes (a raw NUL, invalid UTF-8) was silently ignored: since the config
moved to `.kin/kinbase.toml`, discovery read only the new file when it
existed, and otherwise fell back to `.kin/config` only when it parsed. So
`status` against a hostile kinbase config exited 0 instead of the first-run
table's exit 5, and NF.exit-boundary's config probe failed.
A `.kin/config` that names `kinbase-repo/` is now treated as kinbase's own:
it is read when `kinbase.toml` is absent, and whenever it fails to parse,
so the malformed bytes reach RepoConfig parsing and refuse with
DIGEST_MISMATCH (exit 5). Kindex's YAML never names that schema, so it is
still left alone, which keeps the sharing that `kinbase.toml` was added for.
Spec: spec/cli.md NONFUNCTIONAL first-run-failures ("malformed certificate/config | exit 5 and quarantine")
Spec: spec/architecture.md §11 ("Existing `.kin/config` ... with an incompatible schema block and preserve bytes")
e970ae5 moved kinbase's tracked config from .kin/config, which Kindex owns, to .kin/kinbase.toml, but the ratified spec still names .kin/config in cli.md, architecture.md and threat-model.md. The amendment records the rename and the lookup rule: Kindex's file is ignored, a pre-rename kinbase TOML at .kin/config is still read, and a .kin/config naming kinbase's schema that does not parse refuses with exit 5. Ratified files are unchanged. Spec: amendment-006-kinbase-config-filename.md (candidate)
214567a made the shared as-of resolver advance to the cached authority snapshot's issued_at whenever that was later, so status, fsck, explain, corpus rebuild and recall echoed as_of_source authority-snapshot:issued_at for an omitted --as-of. Ruling R-1/C12 says an omitted --as-of uses the recorded proof clock and echoes it. The input also moves whenever the cache is refreshed, so two consecutive corpus rebuilds with no --as-of gave different current_view_digest values and V-4's rebuild and restart stages could not preserve the view. The resolver returns the recorded proof clock again. The projector (after its refresh) and the session-start hook still advance to the signed snapshot, so the brief keeps seeing rulings published after the repository's clock. Spec: spec/architecture.md Reduction algorithm (as_of is explicit, never ambient) Refs: evidence/factory-run/validator-rulings-C1-C28.md C12, validator-rulings-2026-09-07.md R-1
V-1's github_export approve/request-change cell recorded pull:42 as absent the moment it was ingested. 9d3a454 dated an export with no header or dated records by its file time, but kept ordering dated exports by their record times, so the two clocks were compared directly: two undated issue exports written today outranked a later export whose pull was last updated in March, and the newest snapshot was taken to be one that lacks the pull. An export's own time and a file time are now never compared. When any export carries no own time, all are ordered by file time; otherwise by their own time as before. An undated newest export still wins, and a checkout's identical file times still defer to the exports' own dates. Spec: spec/verification.md V-1 lifecycle matrix
… ingest test_git_authorship_survives_ingestion_without_inventing_human_review failed for both parametrisations: `ingest git_history` observation rows carried no `provenance` or `standing` at all, and a commit with an agent `Co-authored-by:` trailer under a person's author name was classified `human_review`. That provenance caps at `prevalent`, so trailer-marked commits could climb exactly where amendment 003 says they never may; a name in the author field is whoever ran the tool, not evidence of review. An agent marker now yields `ai_generated` regardless of the author identity. A ref record inherits the provenance of the commit it names instead of the `unknown` default. Ingest reports each observation's provenance and the standing it is admitted at, computed by the same helper corpus admission signs with (`model::observation_standing`), so the two cannot disagree. Spec: amendment-003-ruling-contract.md requirements 4 (provenance) and 6 (unlabelled)
test_conflicting_evidence_without_answering_authority_opens_question and test_shrug_is_terminal_while_unruled_remains_actionable failed because a two-head conflict never raised a question. The conflict Unknown blocks "use of logical key K", which matches neither the projected task nor the decision, so `has_blocking_unknown` was false and the question stage was skipped outright. The "a contested key always asks" branch inside it (bd9502f, kept by c76147d) was unreachable. The stage now also runs when an open conflict exists; the stopping reason reports a raised question only when an Unknown actually blocked this projection. With questions raised, the shrug case then failed: the reducer drops a shrugged key's derived Unknowns, but the question already raised and its persisted Unknown stayed open on every later read. A recording projection that sees a current `shrug` now closes that key's still-open questions, appending a closed question record and a signed Unknown closure naming the shrug fact. Already-closed questions are untouched, so repeated projections append nothing. `find_unknown` gains a repo-explicit variant so closure reads the repository being projected rather than the working directory. Spec: amendment-003-ruling-contract.md requirements 2 (unknown) and 5 (shrug)
Since the UserPromptSubmit hook began queueing prompts for a detached `session observe` worker (8379a2a), a message the host later delivers in its transcript is observed twice: once under the id the hook derives from the prompt text, once under the host's own id. Each copy minted its own observation, candidates and receipts, so a Stop returned both sets and V-9 parity failed with "host Stop did not retain the observation's admission receipts". observe now looks up the session's events before it assigns ids: a record whose text the session already observed, where either side is a hook prompt id, takes the id seen first. Candidate ids are derived from the message id and admission is idempotent per candidate, so the second copy returns the first copy's receipts and the identity-keyed ledgers keep one row. The worker and an explicit observe can run at once, so the read and the ledger appends are serialized by a lock beside the Personal ledgers. Spec: spec/verification.md V-9 parity
test_expired_closing_deadline_emits_one_signed_orphan_abandoned found no orphan_abandoned after the closing deadline. `session observe` admitted a message's candidates in sentence order, so for "personal. company. codebase." the Company attempt failed against an unreachable endpoint while only the Personal sibling had committed. The apology went to Personal alone; the Codebase sibling committed afterwards and was owed none. Since b8273fa a repository closes only the apologies its own Codebase committed, so the deadline had nothing to abandon. Local destinations are now admitted first and Company last, so every destination committed by the time Company fails receives its apology. Spec: spec/architecture.md (a terminally divergent fan-out emits a new apology Unknown in every committed destination)
After a fan-out was killed, test_kill_at_every_transition_then_concurrent_retry retried it with two concurrent checkpoints and found two Codebase events for one candidate. Each checkpoint read the journal outside the admission lock, found no reservation, built its own event bytes (a different asserted_at), then took the lock in turn; the second rebound the nonce to its own bytes and committed a second event. Under the lock, a reservation another process completed meanwhile now decides the bytes, so a concurrent retry commits the same content-addressed event. Spec: spec/architecture.md (a matching committed event returns its original receipt)
Two concurrent checkpoints in test_kill_at_every_transition_then_concurrent_retry opened a store that had no quarantine identity column yet. Both saw it missing, both ran ALTER TABLE, and the second failed "duplicate column name", ending its checkpoint with RUN_INTEGRITY_FAILED. The column arrived in d7a0522 as a check-then-alter migration. A duplicate-column failure now means another process added the column first; the unique index is still created if absent.
test_partial_fanout_failure_does_not_roll_back_committed_destination timed out with empty stdout: observing the held-out corpus against a Company endpoint that accepts connections and never answers waited the 20 s read budget once per Company candidate, 44 of them, far past the 120 s the caller allows. The budget was 1.5 s when the suite last passed; af69319 raised it to 20 s so slow snapshots stop reading as outages, and that stays. A process now remembers an endpoint that let a request run out its read budget and fails later requests to it at once with COMPANY_UNREACHABLE. The attempts it skips stay pending and are retried by a later pass, as an unreachable attempt already was. Spec: spec/cli.md (COMPANY_UNREACHABLE: Company endpoint cannot answer within timeout)
…changelog Read .kin/config once and match a named marker instead of a hard-coded length. Amendment 006 and release.yml no longer name the deployment, which also clears generic_by_construction's last disclosure. The changelog now lists every user-visible change in this branch, not only the hook-prompt fix.
Adoption matched on text alone, so an assistant turn that repeated a captured prompt word for word took the prompt's id; its observation and atoms then collided with the prompt's and the identity-keyed ledgers dropped the assistant turn as a duplicate. Session events now record the message role, and adoption applies only when both the record and the earlier event are user messages. An event written before the role was recorded is never adopted, which keeps the turns apart as they were before adoption existed.
commit_provenance searched the subject as well as the trailers and author identity for agent markers. Once an agent marker meant `ai_generated` outright, an ordinary subject such as "Fix cursor pagination" marked an unattributed commit as agent-written, and ingest reported provenance that no metadata supports. A subject is prose, not authorship: only the `Co-authored-by` trailers and the author identity attribute a commit now, and unmarked history stays `unknown`. Spec: amendment-003-ruling-contract.md requirements 4 (provenance) and 6 (unlabelled)
…lict once Review of the shrug and contested-key questions found four defects: - close_shrugged matched questions by logical key alone, so a shrug held by an evidence repository, or in another store under the same key, closed a question it does not govern. Shrugs are now taken only from this repository's own stores and match on the key and the scope of the Unknown the question asks about. - A close_shrugged error (a question whose Unknown record is missing, for one) refused every projection. It now reports a `shrug-closure-failed` diagnostic and the projection continues, as the orphan-abandonment path does for status. - close_unknown byte-sliced the closing id at 7..19, which panics on a short id or one whose range splits a character; a shrug fact id reaches it unvalidated. It slices with `str::get` and falls back to the whole id. - A conflict outside the projected decision was asked on every recording projection under the caller's decision, and the question id hashes the decision, so each distinct --decision opened another question for one conflict. Such a conflict is now asked under the decision its first question used, so it keeps one question. Blocking Unknowns still ask per decision, since the decision is what they block. Also removes find_unknown, left without callers when closure moved to the repository-explicit lookup. Spec: amendment-003-ruling-contract.md requirements 2 (unknown) and 5 (shrug)
http::request marked timeout_observed on any error reading the status line, so a connection reset also looked like a spent read budget, and the client then skipped that endpoint for the rest of the process. Only WouldBlock (macOS) and TimedOut (Linux) now count as a timeout; any other read error is still COMPANY_UNREACHABLE and the endpoint is asked again.
The checkpoint admitted a session's candidates in candidate_id order, so a Company candidate could still be tried before its Codebase sibling. If Company then failed, the Codebase commit that followed got no apology, the same orphan gap that observe already closes by admitting Company last. The checkpoint now orders its candidates the same way, keeping candidate_id order within each group. Spec: spec/architecture.md (a terminally divergent fan-out emits a new apology Unknown in every committed destination)
Under the lock, reserve_nonce re-read the journal only when the reservation was complete. A peer that began a reservation and crashed before completing it had already bound its event bytes, and this process then rebound the nonce to its own different bytes. Under the lock, any bytes already bound now win, just as they do in the read outside the lock. A completed reservation returns as before.
f958cf3 to
7a94e0d
Compare
|
@adaptcom review |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a94e0dc63
ℹ️ 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".
Only a timeout while reading the status line set timeout_observed. When Company sent the status line and then stalled in the headers or the body, those reads used up the same read budget but reported nothing, so the client never marked the endpoint unanswered. A fan-out then waited the full budget again for every candidate. The status-line, header, fixed-body and chunked-body reads now report through one helper. As before, only WouldBlock or TimedOut counts as a timeout, so a reset in any phase still does not mark the endpoint. A unit test stalls a loopback answer after the status line, after the headers, and mid chunked body, and checks that each reports the timeout.
A projection raises at most one question, and the stage visited non-blocking Unknowns in the same order every time. Once the first open conflict had a question, ensure_question returned that existing id on every later projection and the loop took its one-question break there, so a second contested key was never asked; an unrelated high-loss Unknown with a question starved conflicts behind it the same way. A non-blocking Unknown that already has a question is now skipped before the break, so each projection asks the next one not yet asked and every open conflict gets exactly one question. That skip also replaces asking under the first question's decision as the guard against one question per --decision. Blocking Unknowns are unchanged: they are asked per decision, since the decision is what they block. A unit test drives two open conflicts through two projections and checks both are asked once. Spec: amendment-003-ruling-contract.md requirement 2 (unknown)
|
@codex review |
|
@adaptcom review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 398a37f6af
ℹ️ 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".
When a projection had several blocking Unknowns, the first kept its existing question and took the one-question break every time, so a second blocker was never asked and could never be resolved. A blocker already asked under this decision still supplies the reported question, but the walk continues until one new question is raised.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f0e0b0d2b
ℹ️ 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".
Problem
On
mainthe acceptance suite does not start: #24 editedspec/architecture.md,verification.mdandcli.mdin place, so their digests stopped matchingratification-manifest.jsonand every run stops withINVALID_HARNESS. Run against the ratified bytes,mainfails 18 of 345 nodes (the README's last full pass was 371/371 atf7696c5, 2026-09-09).Result
Full suite on this branch (
tools/parallel_acceptance.py -j 10, pinned hostscodex-cli 0.154.0andclaude 2.1.274): 339 passed, 6 failed (main: 327 passed, 18 failed). The 6 remaining are listed below with the reason each cannot be fixed here.cargo test -p kinbase: all pass, includinggeneric_by_construction, which fails onmainbecauserelease.ymlnamed the deployment.Spec
spec/amendment-005-managed-deployment-bind.md).allow_non_loopbackbehaviour is unchanged..kin/config→.kin/kinbase.tomlrename frome970ae5, which the spec never picked up.Jeremy approved amendments 004–006 on 2026-11-16 (conveyed by Shane).
Fixes
e970ae5silently skipped a malformed kinbase.kin/config.kin/confignamingkinbase-repo/is kinbase's; malformed bytes refuse with exit 5--as-of214567amoved the shared resolver to the authority snapshot'sissued_at, against ruling R-1/C12resolve_as_ofreturns the recorded proof clock; projector and SessionStart keep214567a's advance9d3a454compared one export's mtime with others' record dateshuman_review; ingest rows lacked provenanceai_generated; refs inherit their commit's provenance; ingest reportsprovenance/standingclose_shruggedcloses the settled question8379a2aobserved each hook prompt twice (hook + transcript).observe.lockaf69319's 20 s read budget × 44 candidates exceeded the harness limitRemaining 6 failures (plus one flaky)
test_instrument_declares_no_open_validity_debt,test_native_host_events_prime_capture_and_exclude_personal[codex|claude]: the suite's own debt 18. V-9 requires a real host session to deliver hooks; the harness never starts one. Tester-lane work undertests/.test_five_pinned_runs_lower_bound_meets_macro_f1_and_shared_precision: needs the liveollama:qwen2.5:7bmodel the Validator provisions; the deterministic fallback scores 0.833 (same atf7696c5).test_sandbox_denies_personal_root_for_shared_processes:84474d9truthfully reportspersonal_root_readable: truebecause the shared projection runs in the hook process. Passing needs a sandboxed helper per prompt (architecture §1): a design decision with a per-turn cost.test_kill_at_every_transition_then_concurrent_retry(apology transition): the test's 20 s window cannot see a Company failure that takes Let a deployment set the Company snapshot budget instead of the binary #46's 20 s read budget. Needs a timeout decision.test_matched_conversations_produce_identical_canonical_payloadspassed in the final run but is flaky (about 1 in 2 earlier, 1 in 3 after the review fixes): SessionStart's clock advances to the snapshot'sissued_at(214567a), so a fact admitted after the last refresh is sometimes not yet in effect.For reviewers
7fd289dpartly reverts214567a(Jeremy) forstatus/explain/recall, per C12.projectstill reportsauthority-snapshot:issued_at, which C12 strictly disallows; untested, left as is.Co-authored-bytrailers will re-record asai_generatedon their next ingest..observe.lockis one store-wide lock held through classification (shortcut:comment): with a live classifier, background prompt workers can queue; Stop then reports them as pending.kinbase company serveprocesses: about 100 orphans per full run. Worth fixing in the harness or by having the service exit with its parent.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.