Conversation
…gn-by-contract resurrection per Aaron 'maybe we could resurect' (2026-05-01) Aaron's verbatim "me to you:" framing during the SRE / DbC prior-art discussion (B-0141 follow-up): - "Design-by-contract used to be supported in dotnet first class Code Contracts. it died." - "maybe we could resurect" - "they could not fgured out how to make to preformant" - "but the primitives are in the dotnet frameowr but noops" P3 (research-grade exploration; long-horizon; substantive effort). Filing IS the action; implementation deferred. Search-first verification 2026-05-01 (per version-currency-always-search-first rule): the System.Diagnostics.Contracts namespace + Contract.Requires/ Ensures/Invariant primitives still exist as no-ops in modern .NET; the rewriter (ccrewrite) + static verifier (cccheck) toolchain was deprecated. Microsoft Learn confirms: "no Code Contract 'tooling' available in Visual Studio 2013 or in the latest versions of the .NET Framework" but the open-source library remains on GitHub. Acceptance criteria laid out: prior-art audit (Code Contracts + Eiffel + Spec# + Dafny + LiquidF# + Roslyn analyzers + F# computation expressions); design proposal (source-generator vs runtime-rewriter vs hybrid); perf budget (<5% release-mode overhead — the load-bearing constraint that killed the original); F#-idiomatic syntax (not C# 1:1 port); verification integration (feeds Soraya's TLA+/Lean/Z3/FsCheck portfolio). Composes with B-0141 (pre/post pattern as the abstract architectural class — DbC is one concrete instantiation). Sources cited per search-first authority rule. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds a new P3 backlog row proposing a research-grade exploration of resurrecting/modernizing .NET Code Contracts for Zeta’s F#/.NET 10 stack, and updates the generated backlog index to include it.
Changes:
- Added new backlog row B-0142 documenting motivation, candidate approaches, acceptance criteria, and sources.
- Regenerated/updated
docs/BACKLOG.mdto include the new B-0142 entry.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| docs/backlog/P3/B-0142-resurrect-dotnet-code-contracts-aaron-2026-05-01.md | New P3 backlog entry describing a Code Contracts resurrection investigation with acceptance criteria and citations. |
| docs/BACKLOG.md | Adds B-0142 to the auto-generated backlog index. |
…/P2 + lint) - Line 58 (P2 grammar): "could not figured out" → "could not figure out" (paraphrase grammar-correction marked). - Line 111 (P1 xref): glob `feedback_pirate_not_priest_*` → full path `memory/feedback_aaron_pirate_not_priest_*.md`. - Line 172 (P1 xref): "CLAUDE.md § Claude-Code-harness" framing wrong (CLAUDE.md doesn't section-number) → quoted actual heading + bullet name. - Line 174 (markdownlint MD049): `Result<_,_>` was parsed as emphasis (underscore vs asterisk style); wrapped in backticks so it renders as code-span.
|
Superseded by merged #1349 (B-0142 Code Contracts revival) — main has the row file at |
Summary
P3 backlog row per Aaron's "me to you:" framing 2026-05-01 — speculative-research-class exploration of resurrecting Microsoft Research's Code Contracts library (died ~2017) in modern F# / dotnet 10.
Aaron's verbatim:
Search-first verification (per CLAUDE.md version-currency-always-search-first)
The
System.Diagnostics.Contractsnamespace +Contract.Requires/Contract.Ensures/Contract.Invariantprimitives still exist as no-ops in modern .NET; the toolchain (rewriterccrewrite+ static verifiercccheck) was deprecated. Microsoft Learn confirms: "no Code Contract 'tooling' available in Visual Studio 2013 or in the latest versions of the .NET Framework" — but the open-source library remains on GitHub.The historical reason for death: perf-overhead from contract-rewriter inserted runtime checks + static-verifier soundness/incompleteness/scaling issues.
Resurrection-path candidates
Acceptance criteria laid out
<5%release-mode overhead vs non-contracted hot pathComposes with
Test plan
BACKLOG_WRITE_FORCE=1 ./tools/backlog/generate-index.sh🤖 Generated with Claude Code