Mount the corpus by proposal: a pass and an open-after-moment signal (milestone 458 step 7) #203

Merged
bvandeusen merged 3 commits from dev into main 2026-10-05 16:31:43 -04:00
Owner

Milestone 458 step 7 (#4925): a rule written before moments existed is attached to none.

  • Judgments table: rule_moment_judgments (migration 0118, backup v23) records suggested / confirmed / rejected per (rule, moment), and whether it came from a pass, the signal or an edit.
  • The pass:
    • rules_to_mount lists unjudged rules;
    • propose_rule_moments records suggestions, which mount nothing;
    • rule_moment_proposals / judge_rule_moments put them to the operator;
    • the same service backs REST and a "Waiting on you" panel in Settings › Moments.
  • Edits are judgments: set_rule_moments confirms what an edit added and rejects what it removed, in the same transaction.
  • The signal:
    • the plugin keeps a per-session acts ledger;
    • opening a rule sends the last three minutes of acts to /api/plugin/rule-opened;
    • opens are counted per distinct session, using the lesson↔rule evidence model;
    • once a pair is due, one line asks the session to offer the mount.
  • Cleanup: a session that ends removes its scribe-moment files.
  • Plugin: 2026.10.05.2003.

dev CI green: run 8194 on c404a31.

🤖 Generated with Claude Code

Milestone 458 step 7 (#4925): a rule written before moments existed is attached to none. - **Judgments table:** `rule_moment_judgments` (migration 0118, backup v23) records suggested / confirmed / rejected per (rule, moment), and whether it came from a pass, the signal or an edit. - **The pass:** - `rules_to_mount` lists unjudged rules; - `propose_rule_moments` records suggestions, which mount nothing; - `rule_moment_proposals` / `judge_rule_moments` put them to the operator; - the same service backs REST and a "Waiting on you" panel in Settings › Moments. - **Edits are judgments:** `set_rule_moments` confirms what an edit added and rejects what it removed, in the same transaction. - **The signal:** - the plugin keeps a per-session acts ledger; - opening a rule sends the last three minutes of acts to `/api/plugin/rule-opened`; - opens are counted per distinct session, using the lesson↔rule evidence model; - once a pair is due, one line asks the session to offer the mount. - **Cleanup:** a session that ends removes its `scribe-moment` files. - **Plugin:** 2026.10.05.2003. dev CI green: run 8194 on c404a31. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 3 commits 2026-10-05 16:31:40 -04:00
feat(moments): mount the corpus by proposal - a pass and an open-after-moment signal, both stopping at the operator (milestone 458 step 7, #4925)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 19s
CI & Build / integration (push) Failing after 43s
CI & Build / Python tests (push) Failing after 46s
CI & Build / TypeScript typecheck (push) Successful in 55s
CI & Build / Build & push image (push) Skipped
dfcf4df2e9
A rule written before moments existed is mounted on nothing. Step 7 records,
per (rule, moment), whether it belongs there and who said so:

- rule_moment_judgments (migration 0118, backup v23): suggested / confirmed /
  rejected, from a pass, the signal, or an edit. Moment "" is "no moment fits".
- The pass: rules_to_mount lists unjudged rules; propose_rule_moments records
  suggestions that mount nothing; rule_moment_proposals and
  judge_rule_moments put them to the operator. A confirm mounts, a reject is
  kept so the pair is never proposed again. Same service behind REST and a
  "Waiting on you" panel in Settings > Moments.
- Edits are judgments: set_rule_moments, the one mount write path, confirms
  what was added and rejects what was removed in the same transaction.
- The signal: scribe_moment.sh keeps a per-session acts ledger; when a rule
  is opened, scribe_record_opened.sh sends the last three minutes of it to
  /api/plugin/rule-opened. The acts resolve through the install's mappings;
  work.run and work.change are not evidence. Counted per distinct session
  with lesson_rules' evidence model, and once due the open returns one line
  asking the reader to offer the mount.
- scribe_session_end.sh removes the session's scribe-moment files.

Plugin 2026.10.05.2003.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test(backup): register the rule_moment_judgments builder in the import column guard (milestone 458 step 7, #4925)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 16s
CI & Build / TypeScript typecheck (push) Successful in 55s
CI & Build / integration (push) Successful in 56s
CI & Build / Python tests (push) Failing after 1m44s
CI & Build / Build & push image (push) Skipped
570d1b6d5a
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test(retrieval): the proposal endpoints are routed on the app (milestone 458 step 7, #4925)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 19s
CI & Build / TypeScript typecheck (push) Successful in 55s
CI & Build / integration (push) Successful in 1m2s
CI & Build / Python tests (push) Successful in 2m17s
CI & Build / Build & push image (push) Successful in 56s
c404a3127a
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bvandeusen merged commit 2b52afcd72 into main 2026-10-05 16:31:43 -04:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledScribe#203