Skip to content

Agents report wrong, outdated or missing knowledge with knowledge.reports.* - #1947

Open
VanshajPoonia wants to merge 25 commits into
ClickHouse:mainfrom
VanshajPoonia:issues/1147-knowledge-reports
Open

VanshajPoonia wants to merge 25 commits into
ClickHouse:mainfrom
VanshajPoonia:issues/1147-knowledge-reports

Conversation

@VanshajPoonia

@VanshajPoonia VanshajPoonia commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Closes: #1147
Related: #1232

Changelog category (leave one):

  • New Feature

Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):

Agents and clients report a memory claim or a document as incorrect or outdated, or report missing knowledge, with knowledge.reports.submit. Namespace admins review the reports with knowledge.reports.list, knowledge.reports.get and knowledge.reports.update, and a reporter adds evidence with knowledge.reports.evidence.

Why

Step 1A of #1232. An agent that finds a claim wrong or a passage outdated has no way to say so short of editing the target, and maintainers have no queue of such findings. A report records the problem and points at its target; it never edits it. The fix stays an ordinary memory or document write, and resolving a report names the published revision that made it.

Memory proposals and definition drafts were checked first and cannot hold this: both are candidate memory rows decided by accept or reject, while a report points at someone else's claim, or at nothing, and must never be recalled. So reports get their own table, loom.knowledge_reports, modelled on the knowledge gap tables.

Design, in docs/architecture/knowledge-reports.md:

  • The reporter is the person the token stands for, folded as knowledge gaps fold askers, so a user erasure finds a user's reports by the same spellings. The gap helpers move unchanged to server/knowledge/app/people.py.
  • The caller must read the target: a memory key through readable_version, which reads as memory.get does under the report's identity tuple and serves nothing of the row; a document through knowledge.get's read path. A target the caller cannot read answers 404.
  • The report id hashes the reporter, kind, target and problem text, so a retry files one report with or without an Idempotency-Key.
  • Each change is a read and a write under a per-report claim (leases.holding), so two maintainers never build on the same version.
  • Writes run behind the erasure fence knowledge gaps use (erasure_since): an unfinished erasure that reaches the report's namespace or people answers 409, and a version that lands as one starts is deleted.
  • get serves a report to its reporter and the namespace's admins; an admin who cannot read the target now sees it without the problem and the correction. list rows carry no one's words.
  • Tokens narrowed below the namespace cannot call knowledge.reports.*, as with knowledge.gaps.*.

Scope and risk

Touches: a migration and the report table, its erasure steps and census rows, five ops, memory.get's read-scope narrowing (moved into _within_read_scope, behaviour unchanged), and the gap person helpers (moved, behaviour unchanged).

Left for a follow-up: the dashboard's report queue. Until it exists get, list and update are named in NOT_IN_DASHBOARD. Also left out: #1766 (a search verdict on a missing-knowledge report).

Risk: a report holds people's words, so every read checks the target and the role, list rows carry no text, and both erasure scopes cover the table. Open #1510 also adds a migration 118; whichever lands second renumbers.

Compatibility, rollout and rollback

  • Wire: adds knowledge.reports.submit, get, list, update and evidence, all experimental. No existing op or field changes.
  • Operator steps: none. While a replica without the table serves, the three write ops answer 503 (rolling-upgrades rule 68).
  • Rollback: the table and its rows stay. Before rolling back, delete its rows, and again after the first older replica serves, since an older build's erasure has no step for it.

Tests

  • tests/unit/test_knowledge_reports.py (26 tests): the reporter comes from the token, the target read check, the id a retry repeats (also after the target or a linked report is gone), a blank problem, the refusals, who reads a report, a changed or unreadable target, the queue without words, every maintainer action, expected_version, the claim held elsewhere, the reporter's evidence, both sides of the erasure fence, a link to an erased report, the rollout gate, narrowed tokens, and readable_version serving nothing. The domain rules keep their tests in tests/unit/test_knowledge_reports_domain.py.
  • tests/integration/test_knowledge_reports.py (5 tests) against a ClickHouse started with dev/ci_start_clickhouse.sh and make migrate: a version read back with every column, the latest version winning, the queue's filters, the handlers' submit, update and evidence under the claim, and both erasure steps.
  • The erasure census counts and step order (test_erasure_verify.py, test_erasure_step_order.py) include the new table and step.
  • make lint and make typecheck pass; make schema-dump reports schemas/schema.sql current; every generator in docs/development/adding-an-operation.md was run, and the reach census, SDK, docs and op-gate tests pass.
  • tests/unit/test_knowledge_ingest.py and tests/integration/test_knowledge_gaps.py::test_gap_draft_rereads_eligible_questions_and_claims_one_model_attempt fail on this machine on main too (the first needs the local job runner, the second a server heartbeat), so they were not part of this check.

AI assistance in the code (leave one; writing this description with AI is fine):

  • AI-generated (an agent wrote most of the diff): Claude Code wrote the diff and ran the checks listed under Tests.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Local format, lint, type checks and focused tests pass. The full make test-unit and applicable integration results are reported by CI; a full local run is not required before pushing.
  • Generated files are regenerated in this PR, not by hand: the SDK op tables, docs/reference/configuration.md and the docs/reference/ tables (python scripts/codegen/docs_reference.py), the reach manifest, schemas/schema.sql (make schema-dump), the Codex plugin copies (python3 scripts/codegen/agent_plugin_sync.py) and the standalone skill bundles (python3 scripts/codegen/standalone_skills.py).
  • A new migration is additive and numbered after the latest on main; no merged migration is edited.
  • A behaviour change to any file a plugin ships (hooks/, lib/, bin/, skills/, .mcp.json, the Codex plugin-defaults.json) bumps both plugin manifests' version, and no other open PR uses that version.
  • The frontend builds (npm --prefix frontend run build) and its tests pass, if frontend/ changed.
  • Docs under docs/ describe the system as it now is, and this description names any operator steps and wire changes.
  • Repository text has no dates, people, host names, internal namespaces, ticket or decision numbers; the history goes in this description (tests/unit/test_public_copy.py).
  • Commits are signed off (git commit -s), as CONTRIBUTING.md asks.
  • I signed the Contributor License Agreement (CLA) if CLA assistant requested a signature.

Note

Medium Risk
Adds a new SoR for user-authored text with admin-only queue access, target readability checks, and erasure/rollout gates; behaviour is well bounded but touches auth, erasure, and rolling upgrades.

Overview
Introduces knowledge reports: agents and clients can flag memory claims or documents as missing, incorrect, or outdated via knowledge.reports.submit, without editing the target. Namespace admins work a maintainer queue through knowledge.reports.list, knowledge.reports.get, and knowledge.reports.update (take, resolve with a published revision, dismiss, etc.); reporters add reference-only evidence with knowledge.reports.evidence.

Persistence is a new loom.knowledge_reports table (migration 118, ReplacingMergeTree by report version), with per-report write claims, erasure fencing and user/namespace erasure steps, and 503 on write ops during mixed-version rollout when older replicas lack the table. Narrow read-scope tokens are blocked from all knowledge.reports.* ops. Token person resolution for gaps/reports is centralized in server/knowledge/app/people.py (moved from gaps).

Five experimental ops, generated SDK surfaces (Go/Python/Ruby/Rust/TS), rate-limit bucket for get, dashboard/reach manifest notes (no UI queue yet), and architecture/docs/reference updates accompany the change.

Reviewed by Cursor Bugbot for commit 728eb89. Bugbot is set up for automated code reviews on this repo. Configure here.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
Knowledge gaps resolved the asker in private helpers. Knowledge reports need
the same person for the reporter, so a user erasure finds both by the same
spellings. The helpers move to server/knowledge/app/people.py unchanged.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
memory.get's read-scope narrowing moves into _within_read_scope, and
readable_version uses it to answer the version and content hash of the row
memory.get would serve, recording no read exposure or sensitive-read audit.
Knowledge reports check their memory target with it.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
…orts.*

submit files a report about a memory claim, a document or missing
knowledge under the token's person, after checking the caller can read the
target; the id repeats for a retry. get serves it to its reporter and the
namespace's admins, list is the admins' queue without anyone's words,
update takes, asks for evidence, resolves, dismisses or reopens it, and
evidence lets the reporter add references. Writes wait for every replica
to know the table, run under a per-report claim, and narrowed tokens are
refused. SDKs and the operations reference are regenerated.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
A version is written and read back with every column, the latest wins,
the queue filters, the handlers file, take and add evidence under the
claim, and both erasure steps remove what they own.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
Submit, update and evidence check for an unfinished erasure that reaches
the report's namespace or its people before the insert and again once the
version is visible, as knowledge gaps record a miss, and delete a version
that landed as one started. A link an update keeps is no longer checked
again, so a related report erased since it was linked does not block new
links.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loom-docs Ready Ready Preview Dec 1, 2026 9:26pm UTC
loom-telemetry Ready Ready Preview Dec 1, 2026 9:26pm UTC

Request Review

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread server/knowledge/app/reports.py Resolved
Comment thread server/knowledge/app/reports.py Resolved
Submit looked up the existing report only after it checked the related
reports and the target again, so a retry after either changed was refused
instead of answered with the report. It now answers a repeat first. A
problem that is blank once trimmed is refused instead of stored empty.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
@zlareb1 zlareb1 self-assigned this Dec 1, 2026

@zlareb1 zlareb1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Report versions need the write provenance required by the repository. The document target field also needs to describe the identifier the lookup accepts.

Comment thread server/knowledge/store/reports.py Resolved
Comment thread server/knowledge/api/models_reports.py Resolved
A maintainer's update stored the reporter's identity tuple and an
assignee, so a version could not say which token principal wrote it.
loom.knowledge_reports now has actor and source_class columns, and
submit, update and evidence stamp them from the token with writer_actor
and source_class_for, never from the body. With auth off the writer is
the identity's agent, or "-" for an update, as the reporter and the
maintainer are.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
The handler looks a document target up by source URI, so the field
description and the refusal now say source URI instead of document id.
The Go and TypeScript wire models and the operations reference are
regenerated.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
knowledge.reports.get is a VIEWER read, so it joins the reads that
spend knowledge.read instead of the write-shaped knowledge.add bucket.
The admin queue read stays in knowledge.add, as the read bucket test
expects for any op that is not read-only.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
delete_version drops a report version that landed as an erasure
started. It writes no cell control row, so it goes with the other
knowledge store deletes.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
Regenerated with LOOM_UPDATE_SNAPSHOT=1. The only change is the five
knowledge.reports methods.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
…ge-reports

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>

# Conflicts:
#	docs/reference/operations.md
#	docs/reference/status.md
#	sdk/go/wire/models.gen.go
#	sdk/ruby/lib/clickhouse/loom/generated/ops.rb
#	sdk/typescript/src/generated/ops.ts
@VanshajPoonia

Copy link
Copy Markdown
Contributor Author

The unit jobs have not run on this fork yet. A local run found three failures from the PR: the read bucket for knowledge.reports.get, the cell control census and the SDK snapshot. They are fixed, and main is merged with the generated files rerun.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread server/knowledge/app/reports.py Resolved
Comment thread server/knowledge/domain/reports.py Resolved
The cap of 20 references was checked before repeats were dropped, so
adding evidence the report already cites could be refused while the
distinct references still fit. The cap now counts distinct references.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
When the directory could not be read or tied the token to two accounts,
the reporter fell back to the token's raw principal. The report id was
hashed with that spelling, so once the person folded again a retry filed
a second report and get and evidence no longer matched the reporter. A
directory failure is now a 503 to retry and a tie is a 403. Get and
evidence resolve the caller before the report, so neither answer says
whether it exists.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>

@zlareb1 zlareb1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The provenance and source URI fixes are in this head. The remaining blockers include report access after a grant downgrade, erasure of maintainer-authored data, and version checks across replicas. The existing reporter identity thread also needs a fix because a directory failure can change who owns the report.

Comment thread server/knowledge/app/reports.py Resolved
Comment thread server/erasure/store/steps_ledgers.py Outdated
return n + await count_then_mutate(
"loom.knowledge_reports",
count_where=where,
mutation="UPDATE assignee = ''",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 — A maintainer can dismiss or request evidence without taking the report. User erasure then misses both their actor and their free-text reason. Clearing assignee also leaves those fields on reports they took. An evidence update carries the reason forward under a different actor, so record who wrote the reason and scrub that user's fields in every version while preserving the reporter's data. Include this case in the erasure census and readback tests.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for tracing the reason through the evidence version. Fixed in 445e214: each version records who wrote its reason in a new reason_by column (migration 118, still unreleased, edited in place). The user step and the census now reach every version where the user is the assignee, the writer actor or the reason's author, and clear only those columns, so the reporter's words stay. The integration test covers an evidence request made without taking the report and carried forward by the reporter's version, and checks the census before and after. schemas/schema.sql gained the column by hand to match the migration because no ClickHouse was available here to dump it, so the CI schema check is the confirmation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reason has an owner field. The actor scrub still misses verified end-user subjects. It strips the human prefix from human:user:<id>, leaving user:<id>, while user erasure passes the bare id and its aliases. Test an end-user maintainer who did not file the report.

input.kind,
input.target_kind,
input.target_key,
" ".join(input.problem.split()),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 — A memory target is read by key and identity tuple, but the deduplication key omits the target tuple. If a namespace-scoped reporter files the same problem on two users' rows with the same key, the second submission returns the first row's report. Bind the ID to the resolved memory target and test distinct rows alongside true retries.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the two-rows case. Fixed in 4775dc7: a memory target's agent, user and session are part of the id. I bound it to the tuple the read resolves under rather than the row it finds, for two reasons. Reports refuse narrowed tokens, so the request tuple is the read tuple. And the id is computed before the target is read, so a retry is still answered after the target is gone. Documents are read by URI alone and keep one id across tuples. test_the_same_key_in_two_rows_is_two_reports covers distinct rows next to true retries.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The request tuple distinguishes different user rows. It still gives two report ids when queries under two different agents both fall back to the same stored row for the user. Bind the id and subsequent target reads to the identity of the row that was found.

Comment thread server/knowledge/store/reports.py Resolved
Comment thread server/knowledge/app/reports.py Resolved
elif input.action in ("release", "reopen"):
next_row["assignee"] = ""
next_row["reason"] = input.reason.strip()
next_row["resolution_revision"] = input.resolution_revision.strip()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 — Resolve accepts any nonblank revision identifier, including a draft identifier while the reported target remains unchanged. Check that the identifier names a published correcting revision, as the operation contract requires.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing back to the contract. Fixed in 8c2fdf9: for a report about a memory claim or a document, resolution_revision must be a revision number newer than the reported one and no newer than what readers are served now. A draft id or an unchanged target is refused. A target that is gone has no published correction, so its report is dismissed instead. Memory versions are not contiguous, so this checks the published range rather than looking up the exact version.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The served-version bound still accepts numbers that were never published. Memory versions are allocated from the clock, so there are gaps between published versions. Require the served correcting version, or verify the supplied version in the history.

if row is None or row["reporter"] != await _caller(input.org, row["agent"]):
raise NotFoundError(f"report {input.report_id!r} was not found")
try:
evidence = rules.check_evidence(list(row["evidence"]) + input.evidence)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 — Submit and evidence accept syntactically valid references without checking that they exist or that the caller can read them. Detail then returns those references without a per-reference access check. Validate citation targets on write and filter unreadable references on read.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for flagging the unchecked references. Fixed in 8145cf4: each reference and the report's run_id are checked as the caller would read them (server/knowledge/app/report_refs.py). A run must be one of the namespace's runs, read as run.get reads it. A reflection is the memory at that key under the report's identity tuple. A gap must be in the latest build and is readable only by namespace admins, as knowledge.gaps.list is. A write citing one the caller cannot read is refused as not found, and get serves only the references the caller can read at that moment.

Get decided a maintainer from the token's claims, so a token minted while
its subject was an admin kept reading other reporters' reports after the
grant fell to viewer. It now asks the namespace gate at admin, which caps
the claim at the live grant. The report tests run on real tokens.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread server/knowledge/app/reports.py Resolved
The id hashed the target key without the identity tuple the key is read
under, so a reporter who filed the same problem about the same key in two
users' rows got the first report back for the second. A memory target's
agent, user and session are now part of the id. A document is read by its
URI alone and keeps one id across tuples.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
Resolve took any nonblank text, so a draft id or a revision of a target
that never changed closed the report. For a report about a memory claim
or a document, resolution_revision is now a revision number newer than
the reported one and no newer than what readers are served now. A target
that is gone has no published correction, so its report is dismissed.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>

@zlareb1 zlareb1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This head fixes the unstable reporter identity and counts unique evidence references toward the cap. The previous blocking findings still apply. I verified that a downgraded maintainer is still authorized from the token role and that maintainer-authored reasons are still outside user erasure. The new identity-folding thread also reproduces from the call order. Report detail refuses an already-authorized maintainer when the reporter identity lookup fails, while the queue remains available.

A writer could answer with version 2 and release its claim before another
replica held the insert. The next writer's FINAL read could then return
version 1, pass expected_version=1 and write a second version 2. Head
reads now use select_sequential_consistency and each version is inserted
synchronously, as the task inboxes do.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
A maintainer can dismiss or ask for evidence without taking a report, and
the user step only cleared the assignee, so their writer actor and their
reason stayed. An evidence version also carried the reason forward under
the reporter's actor. Each version now records who wrote its reason in
reason_by (migration 118, unreleased, edited in place). The user step and
the census reach every version where the user is the assignee, the
writer or the reason's author, and clear just those columns. The
reporter's words stay.

schemas/schema.sql gains the column by hand to match migration 118, since
no ClickHouse was available to dump it; the CI schema check compares it.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
The two erasure checks around an insert did not fence a send already on
its way: a writer cancelled while it awaited the insert left a version
that could land after the erasure verified absence, and the cleanup check
never ran. Each write now takes the org's report write fence and marks
its send uncertain until the insert settles, so an interrupted send keeps
the fence until its bound passes. Both report erasure steps take the same
fence. The check after the insert and delete_version are gone, since no
eraser runs between the check inside the fence and the insert.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
Submit and evidence took any well-formed reference, and get served every
stored reference to anyone who could read the report. Each reference and
the report's run_id are now checked as the caller would read what they
point at: a run of the namespace (run_exists, as run.get reads it), the
reflection memory at that key under the report's identity tuple, and a gap
of the latest build, which only namespace admins read. A write citing one
the caller cannot read is refused as not found. A read serves only the
ones the caller can read then. A reference the report already holds is not
checked again when evidence is added.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>
Get resolved the caller's person before the report and refused on a
failed fold, so a namespace admin whose directory lookup failed, or whose
token is tied to two accounts, lost report detail while the queue still
served them. A maintainer now reads on: only the reporter match is lost.
A caller who is not a maintainer is still refused before the read.

Signed-off-by: Vanshaj Poonia <vanshajtheunique@gmail.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

Reviewed by Cursor Bugbot for commit 728eb89. Configure here.

_stamped(next_row, row["agent"]),
started_s,
{row["reporter"], row["user_id"], row["assignee"]},
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Evidence write can restore erased reason

Medium Severity

knowledge.reports.evidence copies reason and reason_by from a row read under the per-report claim, then inserts that snapshot inside the org write fence while erasure_since is only told the reporter, user_id, and assignee. A maintainer who requested evidence or dismissed without taking is not in that set, and erasure does not take the per-report claim, so a user erasure can finish and an overlapping evidence (or related-only) write can land a later version that puts their words back.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 728eb89. Configure here.

@zlareb1 zlareb1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The erasure race applies to both evidence and related-only updates. The earlier actor erasure, target identity, and published revision findings still have cases to cover. The live admin grant check, sequential head reads, and cancelled-send fence address the earlier findings on those paths.

raise ReportRefused("the target is gone, so no published revision corrects it")
if not revision.isdigit():
raise ReportRefused("resolution_revision is the target's revision number")
if int(revision) <= reported:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 — A resolve request with resolution_revision=² returns HTTP 500. The value passes isdigit() and then int() raises a ValueError that escapes the handler. Validate a decimal revision or turn the conversion error into the existing report refusal. Add this input to the resolution tests.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let agents report incorrect, outdated or missing knowledge

2 participants