Skip to content

fix: compact idempotent summary rows, trailing newline, well-formed rows, counts/pluralization (closes #417)#447

Merged
0xLeif merged 12 commits into
mainfrom
fix/417-compact-idempotent
Jul 27, 2026
Merged

fix: compact idempotent summary rows, trailing newline, well-formed rows, counts/pluralization (closes #417)#447
0xLeif merged 12 commits into
mainfrom
fix/417-compact-idempotent

Conversation

@0xLeif

@0xLeif 0xLeif commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #417 completely for compact and the related archive-tasks output path.

  • Makes changelog compaction idempotent with an explicit provenance marker and cumulative summary handling.
  • Preserves exact LF, CRLF, mixed-ending, trailing-newline, and no-final-newline bytes.
  • Parses Markdown tables without truncating escaped pipes or code-span pipes and emits the exact original table width.
  • Fails closed without writes for malformed, duplicate, overflowed, indented-separator, or reordered marked-summary state.
  • Reports truthful compacted/kept counts and singular/plural labels.
  • Honors text, JSON, Markdown, and GitHub formats for both commands with valid structured output and no ANSI leakage.
  • Uses plan/stage/publish/rollback transactions so planning or staging failures write nothing and late publish failures are reported truthfully.
  • Safely renders unusual paths, including literal Unix backslashes, backslash-before-pipe names, backticks, HTML characters, control characters, and bidi controls.

Lifecycle and review

  • SpecSync change: CHG-0065-make-issue-417-changelog-compaction-idempotent-and-provide-truthful-portable-str
  • Definition approved by the user at digest 4cb1f669e6892906b7ed9d78d872de1eb133de0725ceac4ef262ff7451d99984.
  • Two independent reviewer agents checked every issue-body acceptance row plus adversarial security, compatibility, and regression behavior.
  • No unresolved high- or medium-severity findings remain.
  • The old PR history was replaced with an eight-commit dependency-ordered lifecycle history based directly on current main.

Verification

  • fledge lanes run verify
    • 2,002 unit tests passed
    • 329 integration tests passed
    • release build passed
  • specsync check --strict --require-coverage 100 --force
    • 62/62 specs passed
    • 105/105 files covered
    • 110,054/110,054 LOC covered
  • Private CorvidLabs/spec-sync-sandbox disposable-clone replay
    • first compact/archive apply succeeded
    • second run was a byte-identical no-op
    • JSON stayed parseable
    • rendered Markdown preserved adversarial path names in one table cell
  • Signed Attest provenance recorded at 0.95 confidence with tests passed and human definition approval.
  • Augur returned review at risk 40 and did not return BLOCK.

Test plan

  • Characterization and targeted unit/integration regressions
  • Warm/cold and first-run/second-run behavior
  • LF/CRLF/mixed/no-final-newline fixtures
  • Escaped pipes, code spans, malformed tables, and reordered summaries
  • Transaction planning/staging/publish/rollback failure injection
  • Text/JSON/Markdown/GitHub output and exit semantics
  • Private sandbox replay
  • Full local verification and independent agent review
  • GitHub CI
  • Fresh lifecycle verification and explicit closing approval

@0xLeif
0xLeif requested a review from a team as a code owner July 24, 2026 16:52
@0xLeif
0xLeif requested review from 0xGaspar, Kyntrin and tofu-ux July 24, 2026 16:52
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions 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.

❌ Corvin says...

      _
    <(;\  .oO(oh no...)
     |/(\
      \(\\
      " "\\

"I'm pecking through the errors..."

CI Summary

Check Status
Validate action.yml ✅ Passed
Packaged Action Consumer ✅ Passed
Dependency Audit ✅ Passed
Code Coverage ✅ Passed
Format Check ❌ failure
Docs Site ✅ Passed
Spec Validation ❌ failure
Tests (build, test, clippy) ✅ Passed
VS Code Extension ✅ Passed
📋 Spec Validation Details

❌ SpecSync: Failed

Metric Value
Specs checked 62
Passed 62
Errors 1
Warnings 0
File coverage 100% (105/105)
LOC coverage 100% (87065/87065)

Errors

.specsync/sdd.json

  • meaningful changed paths are not covered by an active change: src/commands/compact.rs, src/compact.rs

Action Items

  • Review and fix -- meaningful changed paths are not covered by an active change: src/commands/compact.rs, src/compact.rs

Generated by specsync · Run specsync check --format github to reproduce


Powered by corvid-pet

@github-actions github-actions 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.

❌ Corvin says...

      _
    <(;\  .oO(oh no...)
     |/(\
      \(\\
      " "\\

"Caw... your imports are all over the place."

CI Summary

Check Status
Validate action.yml ✅ Passed
Packaged Action Consumer ✅ Passed
Dependency Audit ✅ Passed
Code Coverage ✅ Passed
Format Check ✅ Passed
Docs Site ✅ Passed
Spec Validation ❌ failure
Tests (build, test, clippy) ❌ failure
VS Code Extension ✅ Passed
📋 Spec Validation Details

❌ SpecSync: Failed

Metric Value
Specs checked 62
Passed 62
Errors 1
Warnings 0
File coverage 100% (105/105)
LOC coverage 100% (87284/87284)

Errors

.specsync/sdd.json

  • meaningful changed paths are not covered by an active change: specs/cli/cli.spec.md, specs/cli/context.md, specs/cli/requirements.md, specs/cli/tasks.md, specs/cli/testing.md, specs/cmd_archive_tasks/cmd_archive_tasks.spec.md, specs/cmd_archive_tasks/context.md, specs/cmd_archive_tasks/requirements.md, specs/cmd_archive_tasks/tasks.md, specs/cmd_archive_tasks/testing.md, specs/cmd_compact/cmd_compact.spec.md, specs/cmd_compact/context.md, specs/cmd_compact/requirements.md, specs/cmd_compact/tasks.md, specs/cmd_compact/testing.md, specs/compact/compact.spec.md, specs/compact/context.md, specs/compact/requirements.md, specs/compact/tasks.md, specs/compact/testing.md, src/commands/archive_tasks.rs, src/commands/compact.rs, src/compact.rs, src/main.rs, tests/integration/commands.rs

Action Items

  • Review and fix -- meaningful changed paths are not covered by an active change: specs/cli/cli.spec.md, specs/cli/context.md, specs/cli/requirements.md, specs/cli/tasks.md, specs/cli/testing.md, specs/cmd_archive_tasks/cmd_archive_tasks.spec.md, specs/cmd_archive_tasks/context.md, specs/cmd_archive_tasks/requirements.md, specs/cmd_archive_tasks/tasks.md, specs/cmd_archive_tasks/testing.md, specs/cmd_compact/cmd_compact.spec.md, specs/cmd_compact/context.md, specs/cmd_compact/requirements.md, specs/cmd_compact/tasks.md, specs/cmd_compact/testing.md, specs/compact/compact.spec.md, specs/compact/context.md, specs/compact/requirements.md, specs/compact/tasks.md, specs/compact/testing.md, src/commands/archive_tasks.rs, src/commands/compact.rs, src/compact.rs, src/main.rs, tests/integration/commands.rs

Generated by specsync · Run specsync check --format github to reproduce


Powered by corvid-pet

@0xLeif
0xLeif force-pushed the fix/417-compact-idempotent branch from 025b315 to d6c12fd Compare July 27, 2026 06:53
github-actions[bot]
github-actions Bot previously approved these changes Jul 27, 2026

@github-actions github-actions 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.

✅ Corvin says...

      _
    <(^\  .oO(Caw! ^v^)
     |/(\
      \(\\
      " "\\

"Caw! Your code sparkles like a dropped french fry."

CI Summary

Check Status
Validate action.yml ✅ Passed
Packaged Action Consumer ✅ Passed
Dependency Audit ✅ Passed
Code Coverage ✅ Passed
Format Check ✅ Passed
Docs Site ✅ Passed
Spec Validation ✅ Passed
Tests (build, test, clippy) ✅ Passed
VS Code Extension ✅ Passed
📋 Spec Validation Details

✅ SpecSync: Passed

Metric Value
Specs checked 62
Passed 62
Errors 0
Warnings 0
File coverage 100% (105/105)
LOC coverage 100% (110054/110054)

Generated by specsync · Run specsync check --format github to reproduce


Powered by corvid-pet

github-actions[bot]
github-actions Bot previously approved these changes Jul 27, 2026

@github-actions github-actions 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.

✅ Corvin says...

      _
    <(^\  .oO(Caw! ^v^)
     |/(\
      \(\\
      " "\\

"That's a nice looking export you've got there."

CI Summary

Check Status
Validate action.yml ✅ Passed
Packaged Action Consumer ✅ Passed
Dependency Audit ✅ Passed
Code Coverage ✅ Passed
Format Check ✅ Passed
Docs Site ✅ Passed
Spec Validation ✅ Passed
Tests (build, test, clippy) ✅ Passed
VS Code Extension ✅ Passed
📋 Spec Validation Details

✅ SpecSync: Passed

Metric Value
Specs checked 62
Passed 62
Errors 0
Warnings 0
File coverage 100% (105/105)
LOC coverage 100% (110054/110054)

Generated by specsync · Run specsync check --format github to reproduce


Powered by corvid-pet

@github-actions github-actions 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.

✅ Corvin says...

      _
    <(^\  .oO(Caw! ^v^)
     |/(\
      \(\\
      " "\\

"Looking sharp! Like a beak should be."

CI Summary

Check Status
Validate action.yml ✅ Passed
Packaged Action Consumer ✅ Passed
Dependency Audit ✅ Passed
Code Coverage ✅ Passed
Format Check ✅ Passed
Docs Site ✅ Passed
Spec Validation ✅ Passed
Tests (build, test, clippy) ✅ Passed
VS Code Extension ✅ Passed
📋 Spec Validation Details

✅ SpecSync: Passed

Metric Value
Specs checked 62
Passed 62
Errors 0
Warnings 0
File coverage 100% (105/105)
LOC coverage 100% (110054/110054)

Generated by specsync · Run specsync check --format github to reproduce


Powered by corvid-pet

@0xLeif
0xLeif merged commit c74b19e into main Jul 27, 2026
20 checks passed
@0xLeif
0xLeif deleted the fix/417-compact-idempotent branch July 27, 2026 14:42
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.

compact is not idempotent — re-compacts its own summary row and destroys entry counts

1 participant