Repository navigation
OODA: the weekly learning record and the Loop's chart (PR 5 of 5) - #204
Merged
Merged
Conversation
observe-metrics now writes one learning observation per ended ISO week, with the week's counts in a new top-level figures field and its week in week, back-filled from the log as it stood at each week's end (withLogAt folds only the lines up to the cut). Counts, never shares, so the views divide and a small denominator can be shown as too few to say. The dashboard reads the records and never writes one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Six small charts above the Loop's tabs, two per column (Informed, Autonomous, Trusted), one point per weekly learning record, hollow where the denominator is under five, each opening its week; retros and rung changes are dashed vertical marks. lineChart takes an optional third element per point and xmarks, so its other callers draw as before. Under three records the Loop shows totals since the log began instead, since a trend from two points means nothing. The learning sidepeek shows the figures with every record each counted (recomputed from the log as it stood at the week's end, since the line's refs are capped) and lesson efficacy as lists and counts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
supervisor.md §3 says when observe-metrics writes a week's record, what its three columns count, and where to look at what a week counted; operator.md's daily review points at the same records for judging each supervisor. The log-tolerance test's stand-in for a newer kit's field moves off figures, which an observation now has; the G1 golden gains only the Loop's new keys. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s written once - refs are trimmed from the end until the line fits LINE_MAX (writer names are unbounded), so the corrections, first, survive and appendLog never dies before observeFindings - the back-fill reaches back at most LEARN_BACKFILL_WEEKS (104) - writeLearning runs under a lock in run/ and reads the log afresh; the dashboard keeps the earliest record per week - only the supervisor's own record holds a week, as the dashboard counts them - the schema's figures objects are open to counts a later kit adds (spec §8) - the dashboard leaves out a record whose three columns aren't objects - questions per merged ticket is hollow on its merges, "no ticket merged" at none Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
The weekly learning record and the Loop's chart, OODA part 5 of 5. Review fixes from the author's pass: the line fits LINE_MAX, the back-fill is capped at 104 weeks, writeLearning runs under a lock with a dedupe on read, nested figures are left open for forward compatibility, malformed figures are guarded, and only the supervisor's records count as written. Its CI flake was the dashboard refresh stall diagnosed separately, not this code. CI 9/9 at df1cc9c. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR 5 of 5 for the inspectable OODA loop (spec and plan in #193). Stacked on #203 (base
ooda-knowledge). It closes the owner's question: is the loop making the system better informed, more autonomous and more trusted, week by week?Adoption gate: same as #203
This PR adds two top-level observation fields,
weekandfigures. Merge it only when every instance has v0.37.0 or later. Today stacksbot is on v0.33.2.What changes
observe-metricswrites one observation for the past week, and on first run it back-fills one per past week. Each record haskind: learning,source: metrics,subject: project, itsweek(yyyy-Www) andsource_key: learning:<week>. Itsfiguresare counts, never shares. Itsrefshold up to 60 of the records it counted, and itsdetailis one sentence. Records can't be back-dated, so each one carries today'satand its figures come from replaying the log up to the end of its week (withLogAt).observe-metricswrites these records; reading the dashboard never does.lineChartgains hollow and linked points andxmarks; its existing callers draw exactly as before.supervisor.md§3, and a note inoperator.md's daily review.For the operator's review (#190 follow-up)
The review can read:
log --type observation --json: thelearningrecords, withfiguresandweekdashboard-data:ooda.learningpeek learning <id> --json: the counted records and lesson efficacyTests
test/ooda-learning.test.mjs:dashboard-datanever writes a recordvm: tiles, six charts, hollow points, links, marks, unchanged old outputtest/dashboard.test.mjs.log-tolerance.test.mjsnow uses a different made-up field (insights), sincefiguresis real.oodakeys were added.One-way doors
None. Additive fields, behind the adoption gate.
🤖 Generated with Claude Code