Skip to content

docs: fix spec-vs-implementation gaps per audit findings#8

Open
SuperInstance wants to merge 1 commit intomainfrom
greenhorn/spec-fixes
Open

docs: fix spec-vs-implementation gaps per audit findings#8
SuperInstance wants to merge 1 commit intomainfrom
greenhorn/spec-fixes

Conversation

@SuperInstance
Copy link
Copy Markdown
Owner

@SuperInstance SuperInstance commented Apr 12, 2026

Summary

Addressed all 7 open issues in the flux-spec repo by documenting and resolving spec-vs-implementation gaps.

Issues Addressed

Issue Label Resolution
#1 help-wanted, spec Spec is fully populated. Added CONFORMANCE.md confirming completeness.
#2 help-wanted, spec Duplicate of #1. Same resolution.
#3 audit-finding Added CONFORMANCE.md with full opcode mapping table documenting canonical spec vs legacy opcodes.py divergence.
#4 audit-finding ENCODING-FORMATS.md already provides complete formal encoding documentation. Added cross-references.
#5 audit-finding, critical Full divergence table and migration path documented in CONFORMANCE.md.
#6 documentation, audit-finding ENCODING-FORMATS.md addresses all concerns about missing format documentation.
#7 review, isa-convergence Updated SIGNAL.md with Amendment 1 review status.

Changes

  • New file: CONFORMANCE.md
  • ISA.md: Added Appendix C (Conformance Notes)
  • SIGNAL.md: Updated Open Questions with Amendment 1 verdicts
  • README.md: Added new docs to index

Staging: Open in Devin

Address open issues #1-#7:

- Add CONFORMANCE.md: canonical spec vs implementation divergence
  documentation, legacy opcode mapping table, migration path, conformance
  levels (closes #1, #2, #3, #5)
- Note that ENCODING-FORMATS.md (1131 lines) formally defines all 7 encoding
  formats (A-G) with bit-level diagrams (closes #4, #6)
- Update ISA.md: add Appendix C with conformance notes pointing to
  CONFORMANCE.md and ENCODING-FORMATS.md
- Update SIGNAL.md §18: add Amendment 1 review status, link each open
  question to its proposed resolution (addresses #7)
- Update README.md: add ENCODING-FORMATS.md and CONFORMANCE.md to document
  index, update line counts
Copy link
Copy Markdown

@beta-devin-ai-integration beta-devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 3 additional findings in Devin Review.

Staging: Open in Devin

Comment thread CONFORMANCE.md
Comment on lines +183 to +185
0x20 0x00 0x01 0x02 ; ADD R0, R1, R2 (Format E)
0x00 ; HALT (Format A)
; Expected: R0 = 59, halted = true
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Smoke test writes ADD result to R0, which is hardwired to zero — expected result is wrong

The conformance smoke test uses ADD R0, R1, R2 (line 183) and expects R0 = 59 (line 185), but R0 is hardwired to zero throughout the specification. ISA.md:193 states "R0 | ZERO | Hardwired to 0 (writes ignored)", ENCODING-FORMATS.md:74 states "Writes are silently discarded", and the same CONFORMANCE.md:116 says "Register file: R0 hardwired to 0". A conformant VM must discard the write, so R0 will remain 0 — not 59. This self-contradictory test vector will mislead implementers into either thinking their VM is broken or incorrectly implementing R0 as writable. The fix is to use a different destination register (e.g., ADD R3, R1, R2R3 = 59).

Suggested change
0x20 0x00 0x01 0x02 ; ADD R0, R1, R2 (Format E)
0x00 ; HALT (Format A)
; Expected: R0 = 59, halted = true
0x20 0x03 0x01 0x02 ; ADD R3, R1, R2 (Format E)
0x00 ; HALT (Format A)
; Expected: R3 = 59, halted = true
Staging: Open in Devin

Was this helpful? React with 👍 or 👎 to provide feedback.

Debug

Playground

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.

1 participant