Skip to content

Support approved paired baseline privacy redactions - #61

Merged
rore merged 22 commits into
mainfrom
feat/paired-baseline-privacy
Oct 31, 2026
Merged

rore merged 22 commits into
mainfrom
feat/paired-baseline-privacy

Conversation

@rore

@rore rore commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

The known public Work Record contains private provenance in both its source and functional constraints/completion text. Version 1 can redact only source, so it cannot complete this cleanup.

Version 2 reuses the existing receipt for exactly source, constraints and completion_criteria. It replaces source and both baseline/current functional pairs atomically, preserves every other raw marker field and the existing raw chain, and retains the same historical owners, reviewers, holds and obligations. V1 and the existing bounded history/retention checks remain unchanged.

Ordinary Plan/Plan-review metadata redactions precede the bound migration in separate commits. Original evidence remains private; current-content cleanup does not remove historical public exposure.

Required delivery: normal merge commit. Do not squash or rebase. Combining the metadata cleanup with receipt introduction changes unrelated raw fields at that transition and invalidates it. Preserve both reviewed transitions and the original anchor.

Verification:

  • All nine local suite layers passed once, raw exit 0; later commits change Work Record bookkeeping only.
  • Focused parser/backend, real-Git source/standalone, adversarial and two-layout cases passed.
  • Actual source and packaged checkers validate the exact record/anchor and reject no-ref calls. Full known-target and outgoing added-history/commit-metadata privacy scans pass.
  • Independent technical/architecture result review accepted e1c3424, with unchanged-application carryforward through e100335. Whole-diff whitespace issue corrected.
  • Generated dist and native copies match; all instruction budgets pass without increases.

All three required CI checks passed at final approval-record head 457534e5e197f1ecb5c6b7279c3c5dd301e1ce10. The substantive CodeRabbit review reported no actionable comments; its approval-only follow-up was neutral. There are no inline review threads.

High plan and exact replacement wording were explicitly approved. Separate final human result and SPEC architecture approval was received on 2026-10-31 for head 56cb20369000a486ac4cd76798f8cfc0ae8b9d34 (verbatim: “approved”). The architecture checkpoint is recorded. Approval-record-only CI passed, and the required normal merge completed. No live/global/configuration changes, consumer takeover, general exception, private evidence publication or shared-history rewrite.

Delivered by normal merge 00cf3a4cee15f1a276933c159552ac2e123f56c9. Both reviewed transitions and the original receipt anchor are retained; the merged tree exactly matches the final tested head. Source and standalone checkers validate all three reconciled records with the merged commit as trusted base/head (exit 0), and the known target current-content privacy scan passes. Historical exposure remains; original evidence stays private.

rore added 20 commits October 29, 2026 19:20
@github-actions

Copy link
Copy Markdown

agent-redline

❗ RED — Red-zone files changed.

  • red (1): docs/SPEC.md
  • gray (22): .claude/skills/agent-workflow/manifest.txt, .claude/skills/agent-workflow/scripts/agent-workflow-check.py, .claude/skills/agent-workflow/templates/checkpoints/baseline-privacy-migration.md, .claude/skills/agent-workflow/templates/checkpoints/behavioral-integrity.md, .claude/skills/agent-workflow/templates/checkpoints/establish-context.md, .claude/skills/agent-workflow/templates/work-record-expanded.md, .claude/skills/agent-workflow/templates/work-record-routine.md, core/checker/predicates.py, core/templates/checkpoints/baseline-privacy-migration.md, core/templates/checkpoints/behavioral-integrity.md, core/templates/checkpoints/establish-context.md, core/templates/work-record-expanded.md, core/templates/work-record-routine.md, core/work_record/__init__.py, core/work_record/parser.py, dist/agent-workflow/manifest.txt, dist/agent-workflow/scripts/agent-workflow-check.py, dist/agent-workflow/templates/checkpoints/baseline-privacy-migration.md, dist/agent-workflow/templates/checkpoints/behavioral-integrity.md, dist/agent-workflow/templates/checkpoints/establish-context.md, dist/agent-workflow/templates/work-record-expanded.md, dist/agent-workflow/templates/work-record-routine.md
  • blue (8): docs/DECISIONS.md, docs/ENFORCEMENT.md, docs/agent-workflow/baseline-privacy-migration.md, docs/agent-workflow/behavioral-integrity.md, docs/agent-workflow/establish-context.md, tests/checker/test_baseline_history_e2e.py, tests/work-record/test_local_backend.py, tests/work-record/test_parser.py
  • watch (23): .claude/skills/agent-workflow/manifest.txt, .claude/skills/agent-workflow/scripts/agent-workflow-check.py, .claude/skills/agent-workflow/templates/checkpoints/baseline-privacy-migration.md, .claude/skills/agent-workflow/templates/checkpoints/behavioral-integrity.md, .claude/skills/agent-workflow/templates/checkpoints/establish-context.md, .claude/skills/agent-workflow/templates/work-record-expanded.md, .claude/skills/agent-workflow/templates/work-record-routine.md, core/checker/predicates.py, core/templates/checkpoints/baseline-privacy-migration.md, core/templates/checkpoints/behavioral-integrity.md, core/templates/checkpoints/establish-context.md, core/templates/work-record-expanded.md, core/templates/work-record-routine.md, core/work_record/__init__.py, core/work_record/parser.py, dist/agent-workflow/manifest.txt, dist/agent-workflow/scripts/agent-workflow-check.py, dist/agent-workflow/templates/checkpoints/baseline-privacy-migration.md, dist/agent-workflow/templates/checkpoints/behavioral-integrity.md, dist/agent-workflow/templates/checkpoints/establish-context.md, dist/agent-workflow/templates/work-record-expanded.md, dist/agent-workflow/templates/work-record-routine.md, docs/DECISIONS.md

@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 17 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6d5eb9ec-ba10-4940-a287-c63edf41e6f0
Commits

Reviewing files that changed from the base of the PR and between 56cb203 and 457534e.

Files selected for processing: 2
  • .agent-workflow/tasks/paired-baseline-privacy.md
  • .agent-workflow/tasks/public-record-privacy.md

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9d0e767d-6e3f-44a1-b4b0-3c997c6571ec
Commits

Reviewing files that changed from the base of the PR and between d664f6f and 56cb203.

Files ignored due to path filters: 7
  • dist/agent-workflow/manifest.txt is excluded by !**/dist/**
  • dist/agent-workflow/scripts/agent-workflow-check.py is excluded by !**/dist/**
  • dist/agent-workflow/templates/checkpoints/baseline-privacy-migration.md is excluded by !**/dist/**
  • dist/agent-workflow/templates/checkpoints/behavioral-integrity.md is excluded by !**/dist/**
  • dist/agent-workflow/templates/checkpoints/establish-context.md is excluded by !**/dist/**
  • dist/agent-workflow/templates/work-record-expanded.md is excluded by !**/dist/**
  • dist/agent-workflow/templates/work-record-routine.md is excluded by !**/dist/**
Files selected for processing: 27
  • .agent-workflow/tasks/core-behavior-preservation.md
  • .agent-workflow/tasks/paired-baseline-privacy.md
  • .agent-workflow/tasks/public-record-privacy.md
  • .claude/skills/agent-workflow/manifest.txt
  • .claude/skills/agent-workflow/scripts/agent-workflow-check.py
  • .claude/skills/agent-workflow/templates/checkpoints/baseline-privacy-migration.md
  • .claude/skills/agent-workflow/templates/checkpoints/behavioral-integrity.md
  • .claude/skills/agent-workflow/templates/checkpoints/establish-context.md
  • .claude/skills/agent-workflow/templates/work-record-expanded.md
  • .claude/skills/agent-workflow/templates/work-record-routine.md
  • core/checker/predicates.py
  • core/templates/checkpoints/baseline-privacy-migration.md
  • core/templates/checkpoints/behavioral-integrity.md
  • core/templates/checkpoints/establish-context.md
  • core/templates/work-record-expanded.md
  • core/templates/work-record-routine.md
  • core/work_record/__init__.py
  • core/work_record/parser.py
  • docs/DECISIONS.md
  • docs/ENFORCEMENT.md
  • docs/SPEC.md
  • docs/agent-workflow/baseline-privacy-migration.md
  • docs/agent-workflow/behavioral-integrity.md
  • docs/agent-workflow/establish-context.md
  • tests/checker/test_baseline_history_e2e.py
  • tests/work-record/test_local_backend.py
  • tests/work-record/test_parser.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The change adds schema-v2 support for an approved privacy migration that replaces source, constraints, and completion_criteria together. It updates receipt parsing, history validation, tests, specifications, and task records. Schema-v1 source-only migrations remain supported.

Changes: Paired Privacy Migration

Layer / File(s) Summary
Migration contract and approved scope
.agent-workflow/tasks/*, docs/DECISIONS.md, docs/SPEC.md, docs/ENFORCEMENT.md, docs/agent-workflow/*, core/templates/*, .claude/skills/agent-workflow/templates/*
The migration contract documents v1 source-only receipts and v2 paired replacements for source, constraints, and completion_criteria. It specifies approval, history, preservation, and validation requirements. Task records describe the bound migration and its remaining review and delivery gates.
Receipt parsing and raw field extraction
core/work_record/*, .claude/skills/agent-workflow/scripts/agent-workflow-check.py, tests/work-record/*
The parsers accept versions 1 and 2, validate each version’s required replacement keys, and retain the validated version and replacements. A new function extracts raw requirement-history headers and values. Tests cover receipt parsing, round-trips, and raw field extraction.
History validation and end-to-end coverage
core/checker/predicates.py, .claude/skills/agent-workflow/scripts/agent-workflow-check.py, tests/checker/test_baseline_history_e2e.py
The checkers retain v1 transition checks and add v2 checks for paired baseline/current values, existing behavior-change history, atomic receipt introduction, merge-parent agreement, and preservation of unrelated raw fields. End-to-end tests cover valid migrations, invalid transitions, and retained history.

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant WorkRecord
  participant parse_baseline_privacy_migration
  participant privacy_baseline
  participant extract_raw_requirement_history_fields
  WorkRecord->>parse_baseline_privacy_migration: receipt data
  parse_baseline_privacy_migration->>privacy_baseline: parsed version and replacements
  privacy_baseline->>extract_raw_requirement_history_fields: parent and introduction record text
  extract_raw_requirement_history_fields-->>privacy_baseline: raw headers and values
Loading

Possibly related PRs

Merge Risk: Minimal · previous review 56cb2

No code issue identified here blocks merging. Current-head CI and the required human approval remain to be completed.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the pull request’s main change: support for approved paired baseline privacy redactions.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 40.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 15 functions across 7 files. (20 skipped: 20 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

⚠️ Advisory: workflow checks have non-blocking findings

Scope: 3 task files (2 High, 1 Elevated)

Audit detail — per-record checks

core-behavior-preservation

  • ⚠️ Work Record structure — 7 checks, 1 advisory
    • ⚠️ workrecord.commit_order — advisory — Work Record was committed AFTER the first code commit on this branch (WR: 447285d, first code: d840b5b). The WR was likely written retroactively; if the session had been killed mid-task, the WR would not have served as recovery state. Non-blocking; treat as a signal to check whether plan-first discipline held.
  • ✅ Risk classification — 5 checks, all passed
  • ✅ Required reviews — 2 checks, all passed
  • ✅ Other checks — 5 checks, all passed
  • ✅ Exceptions — 3 checks, all passed
  • ✅ Plan approvals — 4 checks, all passed
  • ✅ Verification plan — 2 checks, all passed
Effective rules (28)
Rule Source
workrecord.exists core
workrecord.markers_present core
risk.declared core
complexity.declared core
workrecord.shape_matches_classification core
workrecord.expanded_fields_present core
workrecord.state_valid core
workrecord.relationships_valid core
risk.redline_findings_available default
risk.boundary_violation_absent default
risk.declared_not_below_detected default
review.checkpoints_satisfied default
requirements.baseline_present core
requirements.baseline_unchanged core
requirements.behavior_changes_well_formed core
requirements.task_context_traceable core
requirements.requirement_changes_authorized core
exceptions.well_formed core
exceptions.not_against_boundary core
exceptions.not_expired core
approval.elevated_clean_context_review_present core
approval.high_clean_context_review_present core
approval.high_risk_approval_recorded core
approval.clean_context_does_not_satisfy_human core
review.agent_result_review_present core
evidence.criteria_have_methods core
evidence.failure_not_claimed_as_success core
workrecord.commit_order core

paired-baseline-privacy

  • ✅ Work Record structure — 7 checks, all passed
  • ✅ Risk classification — 5 checks, all passed
  • ✅ Required reviews — 2 checks, all passed
  • ✅ Other checks — 5 checks, all passed
  • ✅ Exceptions — 3 checks, all passed
  • ✅ Plan approvals — 4 checks, all passed
  • ✅ Verification plan — 2 checks, all passed
Effective rules (28)
Rule Source
workrecord.exists core
workrecord.markers_present core
risk.declared core
complexity.declared core
workrecord.shape_matches_classification core
workrecord.expanded_fields_present core
workrecord.state_valid core
workrecord.relationships_valid core
risk.redline_findings_available default
risk.boundary_violation_absent default
risk.declared_not_below_detected default
review.checkpoints_satisfied default
requirements.baseline_present core
requirements.baseline_unchanged core
requirements.behavior_changes_well_formed core
requirements.task_context_traceable core
requirements.requirement_changes_authorized core
exceptions.well_formed core
exceptions.not_against_boundary core
exceptions.not_expired core
approval.elevated_clean_context_review_present core
approval.high_clean_context_review_present core
approval.high_risk_approval_recorded core
approval.clean_context_does_not_satisfy_human core
review.agent_result_review_present core
evidence.criteria_have_methods core
evidence.failure_not_claimed_as_success core
workrecord.commit_order core

public-record-privacy

  • ⚠️ Work Record structure — 7 checks, 1 advisory
    • ⚠️ workrecord.commit_order — advisory — Work Record was committed AFTER the first code commit on this branch (WR: 447285d, first code: d840b5b). The WR was likely written retroactively; if the session had been killed mid-task, the WR would not have served as recovery state. Non-blocking; treat as a signal to check whether plan-first discipline held.
  • ✅ Risk classification — 5 checks, all passed
  • ✅ Required reviews — 2 checks, all passed
  • ✅ Other checks — 5 checks, all passed
  • ✅ Exceptions — 3 checks, all passed
  • ✅ Plan approvals — 4 checks, all passed
  • ✅ Verification plan — 2 checks, all passed
Effective rules (28)
Rule Source
workrecord.exists core
workrecord.markers_present core
risk.declared core
complexity.declared core
workrecord.shape_matches_classification core
workrecord.expanded_fields_present core
workrecord.state_valid core
workrecord.relationships_valid core
risk.redline_findings_available default
risk.boundary_violation_absent default
risk.declared_not_below_detected default
review.checkpoints_satisfied default
requirements.baseline_present core
requirements.baseline_unchanged core
requirements.behavior_changes_well_formed core
requirements.task_context_traceable core
requirements.requirement_changes_authorized core
exceptions.well_formed core
exceptions.not_against_boundary core
exceptions.not_expired core
approval.elevated_clean_context_review_present core
approval.high_clean_context_review_present core
approval.high_risk_approval_recorded core
approval.clean_context_does_not_satisfy_human core
review.agent_result_review_present core
evidence.criteria_have_methods core
evidence.failure_not_claimed_as_success core
workrecord.commit_order core

Updated against commit 457534e5.

@rore
rore merged commit 00cf3a4 into main Oct 31, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant