Skip to content

API Reference parrot.knowledge.wiki.ledger.coder_feedback

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot.knowledge.wiki.ledger.coder_feedback

View source

Reviewer-confirmed coder corrections persisted in the shared SDD ledger.

Class CoderFeedback

One confirmed defect in one coder delivery, asserted by its reviewer.

Model identity is backend + actual model, never a seat label. Evidence and verification are concise references/results, not unbounded test logs.

Fields:

Field Type Default Description
task_id str
attempt_uid str
backend str
model str
source Literal['review_fix_commit', 'code_review']
lesson_scope Literal['model'] 'model'
pattern str
files list[str]
defect Text
evidence Text
correction Text
verification Text
execution_id str FEAT-559: the execution this feedback was recorded under. Empty for historical records.

Method CoderFeedback.feedback_id

Stable occurrence key: retries of the recording call are not recurrences.

feedback_id() -> str

Returns: str

Class CoderFeedbackReceipt

Acknowledgement returned only after the feedback is durably appended.

Fields:

Field Type Default Description
feedback_id str

Class CoderFeedbackStore

Reuse the ledger log's append/replay and shared-worktree resolution.

Feedback uses insight events so corrected bugs never become pending work or merge blockers. Issue compaction does not rewrite the event log.

Parameter Type Default Description
log LedgerLog

Method CoderFeedbackStore.from_root

Resolve the same shared ledger as the other SDD tools.

from_root(root: Path) -> CoderFeedbackStore

Parameter Type Default Description
root Path

Returns: CoderFeedbackStore

Method CoderFeedbackStore.record

Append a reviewer-confirmed correction; reject oversized events.

record(feedback: CoderFeedback) -> CoderFeedbackReceipt

Parameter Type Default Description
feedback CoderFeedback

Returns: CoderFeedbackReceipt

Method CoderFeedbackStore.retract

Withdraw a recorded correction by appending an insight.superseded tombstone.

The event log is append-only, so a misattributed lesson is never rewritten out; replay simply drops every recording of feedback_id made before the tombstone. A later recording of the same occurrence counts again.

retract(feedback_id: str, reason: str, actor: str) -> bool

Parameter Type Default Description
feedback_id str The coder-feedback:<digest> subject to withdraw.
reason str Why the correction is wrong; kept for the audit trail.
actor str Who withdraws it, e.g. human:jesus.

Returns: bool — True when a live record was retracted; False (nothing appended) when feedback_id is unknown or already retracted.

Method CoderFeedbackStore.read_records

Return every live (recorded_at, feedback) record of this plane (public form of the replay).

Duplicate recordings count once (the first wins) and a retraction drops the earlier record.

read_records() -> list[tuple[str, CoderFeedback]]

Returns: list[tuple[str, CoderFeedback]] — The live records, each with the ISO timestamp of its ledger event.

Method CoderFeedbackStore.retracted_feedback_ids

Return IDs whose current replay state is a feedback retraction.

A later record for the same stable occurrence restores it, matching the append-only replay semantics used by :meth:_read.

retracted_feedback_ids() -> set[str]

Returns: set[str]

Method CoderFeedbackStore.context

Render prior corrections for this model, ranked by scope and recurrence.

Include model-wide lessons after matching files/components so a defect can be prevented in newly created modules as well. Keep whole lessons within the estimated budget; never truncate their verification step.

max_age_days is deprecated: passing it warns (once per call site), and leaving it None filters with the historical 90 days without a warning (issue:f36630fccd91 finding h).

context(backend: str, model: str, files: list[str], max_tokens: int = 1800, max_age_days: int | None = None) -> str

Parameter Type Default Description
backend str
model str
files list[str]
max_tokens int 1800
max_age_days int | None None

Returns: str

Alias InsightRecordedPayload

Re-exported from parrot.knowledge.wiki.ledger.events.InsightRecordedPayload.

Alias LedgerEvent

Re-exported from parrot.knowledge.wiki.ledger.events.LedgerEvent.

Alias LedgerLog

Re-exported from parrot.knowledge.wiki.ledger.log.LedgerLog.

Alias LedgerService

Re-exported from parrot.knowledge.wiki.ledger.service.LedgerService.

Attribute Text

Alias append_durably

Re-exported from parrot.knowledge.wiki.ledger.log.append_durably.

Alias estimate_tokens

Re-exported from parrot.knowledge.wiki.store.estimate_tokens.

Attribute logger

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally