Skip to content

fix(rsr): restore the library half of #1117 lost in its merge; main compiles again - #1125

Merged
hyperpolymath merged 2 commits into
mainfrom
fix/rsr-conformance-merge-loss
Nov 14, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
fix/rsr-conformance-merge-loss

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

hypatia main has not compiled since #1117 (0cc44552). lib/rules/rsr_conformance.ex calls deed = deed_state(repo) at line 652 but never defines deed_state/1. The result is undefined function deed_state/1 in Hypatia.Rules.RsrConformance.

The cause is merge commit 4d5538c8 ("Merge branch 'main' into rsr/criteria-accept-chora-deed"), which #1117 was squashed from. It kept the new call but dropped four pieces:

  • the deed_state/1 definition;
  • the 3.2.1 deed == :broken -> :fail branch;
  • 3.1.1's descriptile_carrier/0;
  • the deed-first anchor read for 3.1.8.

#1117's own tests expect the dropped behaviour.

Changes

This touches lib/rules/rsr_conformance.ex only. It restores the file as #1117's last commit before that merge (d0880bb5) had it:

  • 3.1.1 reads a top-level descriptile clause of the chora deed;
  • 3.1.8 reads the (anchor …) clause first;
  • 3.2.1 fails a chora deed that does not parse, whatever .a2ml remains.

Verification

  • mix compile --warnings-as-errors: clean.
  • rsr_conformance tests: 33 pass, 0 failures.

Both were run with Elixir 1.19 / OTP 27.

Split out from rsr/scorecard-assessor so that main is fixed first, without waiting on the scorecard change.


Generated by Claude Code

…ompiles again

The merge commit 4d5538c ("Merge branch 'main' into
rsr/criteria-accept-chora-deed") that #1117 was squashed from kept the
new call `deed = deed_state(repo)` in descriptiles_parse/1 but dropped
the definition of deed_state/1, the `deed == :broken -> :fail` branch,
3.1.1's descriptile_carrier/0 and the deed-first anchor read. So
Hypatia.Rules.RsrConformance has not compiled on main since 0cc4455
(undefined function deed_state/1), and #1117's own tests expect the
dropped behaviour.

This applies the diff from the squash (0cc4455) to the branch's last
commit before that merge (d0880bb) for lib/rules/rsr_conformance.ex
only: 3.1.1 reads a top-level descriptile clause of the chora deed,
3.1.8 reads the (anchor …) clause first, and 3.2.1 fails a chora deed
that does not parse whatever .a2ml remains. With it, the 33
rsr_conformance tests pass and `mix compile --warnings-as-errors` is
clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0136P7ZoBy5xGnGDLk7wQ8jC
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • 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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T20:11:16.057587Z e1136a5 New commits
🔒 Security Review ✅ Completed 2026-11-14T20:11:42.358834Z e1136a5 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copy link
Copy Markdown
Owner Author

hypatia / Hypatia Neurosymbolic Analysis fails here, but not because of this PR. The reusable scan builds the hypatia scanner at main: the log line is Hypatia scanner build failed at commit 6033a7825f4c830eafca514a3fa39811f653498b. It does not build this PR's head. Main doesn't compile because of the deed_state/1 loss this PR restores. The check goes green once this lands.


Generated by Claude Code

Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
@hyperpolymath
hyperpolymath merged commit fdf7df7 into main Nov 14, 2026
44 checks passed
@hyperpolymath
hyperpolymath deleted the fix/rsr-conformance-merge-loss branch November 14, 2026 20:09
@sonarqubecloud

Copy link
Copy Markdown

hyperpolymath added a commit that referenced this pull request Nov 14, 2026
## Summary

This is the writer half of the owner's 2026-11-14 ratification of the
RSR scorecard deed. The grammar half is metadatastician/standards#1586
(`rsr-scorecard.abnf` v0.2.0).

## Changes

- `RsrConformance.to_deed/2` writes:
- `:assessor "hypatia rsr_score <version>"`, with the version from
`mix.exs` at compile time; `assessor/0` returns the same string;
  - `:assessed-at`, the run time in UTC with whole seconds.
- A new `:assessed_at` option lets tests inject a fixed `DateTime`.
Offsets are converted to UTC.
- Tests are extended. `docs/consumers/rsr-oracle.adoc` and the mix task
docs are updated.

**Includes #1125's fix (`89c0ab79`)**, which restores the part of #1117
lost in its merge, because main does not compile without it. Merge #1125
first; this branch then merges cleanly.

## Verification

- `rsr_conformance`: 34 pass, 0 failures.
- `mix format`: clean. `mix compile --warnings-as-errors`: clean.
- `mix hypatia.rsr_score --write` on a copy of hypatia produces a deed
that passes both `deed_lint --rsr-scorecard` and the plain linter, from
the new standards branch.

Merge after metadatastician/standards#1586.

---
_Generated by [Claude
Code](https://claude.ai/code/session_0136P7ZoBy5xGnGDLk7wQ8jC)_

---------

Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
hyperpolymath added a commit that referenced this pull request Nov 14, 2026
#1133 broke (#1136)

## Summary

#1133 (Deed parser v2) merged while one Codex finding and four red
checks were still open. Three of the four reds came from #1133 and are
fixed here. The fourth was already red on main.

## Changes

1. **Codex, `lib/hypatia/deed.ex:104`.** `dispatch/1` accepted any
`*_praxis.deed` without checking the stem.
- In deed.abnf (146–148), `praxis-file` and `repo-file` share one rule:
`stem = 1*( ALPHA / DIGIT / "-" / "." / "_" )`. One `stem/3` now
enforces it for both suffixes.
- Tests: `_praxis.deed`, `☃_praxis.deed`, `café_praxis.deed` and `a
b_praxis.deed` are refused by both `dispatch/1` and `parse/2`.
`my-proj.v2_x_praxis.deed` is accepted. The chora cases still refuse.
2. **Elixir Compile (dogfood toolchain).** `check-no-active-logtalk.sh`
fails on the vendored fixture
`test/fixtures/deed/standards/valid/rsr-template-repo_chora.deed:110`,
which carries the upstream `:report-format "logtalk"`.
- The fixture is added to `.logtalk-allowlist` with the same class
("vendored upstream fixture") and the same removal condition as its two
identical siblings already listed.
- The list's header asks for rule-level review of a new entry. That
review belongs here, because editing the fixture would break its
byte-faithfulness to standards.
3. **governance / UUID v7 and UUID v8 conformance.** `check-uuid-v8.sh
--strict` (pinned at standards 7641c7f) flagged four ids in
`test/deed_conformance_test.exs` that are deliberately not v8.
- Those inputs are now built at run time from one v8 id by swapping its
version and variant nibbles. The assertions are unchanged, and the v5
case now also checks the refusal reason.
- The test file and three vendored invalid fixtures go into
`.uuid-v8-exempt`, following the `test/deed_test.exs` precedent. The
fixtures pass the pinned gate but fail the current standards script, so
the exemption keeps them from breaking when the pin moves.
   - No real id or domain is touched.
4. **Escript packaging soundness: not this change.** It failed on
`undefined function deed_state/1`, which came from #1117's merge. That
red push run sat on 6033a78, before #1125/#1128/#1132. The same error
reproduces on 6033a78, and an unrelated PR failed the same way before
#1133 merged. Current main passes (43638218845).

## Verification

Run with Elixir 1.19.4 / OTP 27.3.4.19, the CI versions:
- `mix compile --warnings-as-errors`: exit 0.
- `mix test`: 3338 tests, 0 failures, 246 excluded (seed 0;
`verisim_data` and the other excluded tags as configured).
- `test/soundness/run-escript-soundness.sh`: 14/14.
- The consumer-shaped scan output passes `check-findings-schema.sh`.
- `mix format --check-formatted` passes on the changed files.
- `check-uuid-v8.sh --strict` passes at the pinned and the current
standards versions. The logtalk guard reports 15 allowlisted, 0
violations.

## For the owner

- **Gate looser than the grammar:** the standards gate `deed_lint.js`
(702–703) doesn't check the praxis stem, so it accepts names the grammar
refuses. The reader now follows the grammar.
- **Formatting on main:** 27 files on main fail `mix format
--check-formatted` under 1.19.4, and no workflow runs that check. Not
touched here.

---
_Generated by [Claude
Code](https://claude.ai/code/session_0136P7ZoBy5xGnGDLk7wQ8jC)_

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

3 participants