-
-
Notifications
You must be signed in to change notification settings - Fork 0
docs: propose "elegance by default" as the fourth operating principle (PROPOSAL — owner ratification) #783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f7d740d
31acf28
8af3f61
772c724
fca1d56
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| // SPDX-License-Identifier: MPL-2.0 | ||
| = Debtfile Specification | ||
| Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> | ||
| v1.0.0, 2026-08-07 | ||
| v1.1.0, 2026-09-14 | ||
| :toc: | ||
| :toclevels: 3 | ||
|
|
||
|
|
@@ -105,11 +105,19 @@ Location: `.machine_readable/Debtfile.a2ml`, one per repository. | |
| - policy: remediable | flag-only | ||
| - tri: eliminate | substitute | control (optional, Safety Triangle) | ||
| - tracking: <owner/repo#N> (optional) | ||
| - taxonomy-choice: non-default (required for a testing-taxonomy departure) | ||
| - taxonomy-default-arm: <long-term-correct arm> | ||
| - taxonomy-non-default-arm: <tolerated arm actually chosen> | ||
| - taxonomy-departure-reason: <why the non-default arm is being tolerated> | ||
| - accepted-until: YYYY-MM-DD | ||
| ---- | ||
|
|
||
| `## <Section>` headings group entries and are otherwise ignored. | ||
|
|
||
| The four `taxonomy-*` fields are required together only when an entry records a | ||
| departure under `testing-and-benchmarking/TESTING-TAXONOMY.adoc`; otherwise omit | ||
| all four. | ||
|
|
||
| === Fields | ||
|
|
||
| `probe`:: A shell command emitting one non-negative integer on stdout. This is | ||
|
|
@@ -129,10 +137,44 @@ per the standing owner directive in `.claude/CLAUDE.md`: licence changes are | |
| manual, per-file and owner-only, and every prior bulk sweep scrambled | ||
| identifiers or reverted owner decisions. | ||
|
|
||
| `taxonomy-default-arm`, `taxonomy-selected-arm`, `taxonomy-departure-reason`:: | ||
| The required, machine-checkable encoding for an entry that records a testing | ||
| taxonomy choice. The first two fields are stable identifiers matching | ||
| `[a-z0-9][a-z0-9._-]*`; they record the elegant long-term arm and the different | ||
| arm actually selected. `taxonomy-departure-reason` records why the non-default | ||
| arm is accepted on this occasion. All three fields must appear together, the | ||
| two arm identifiers must differ, and the reason must be non-empty. Neither | ||
| `description` nor `tracking` substitutes for any member of this group: those | ||
| fields continue to describe the debt and point to its external work item. | ||
|
|
||
| [source] | ||
| ---- | ||
| - taxonomy-default-arm: adapt-proven-idris2-test | ||
| - taxonomy-selected-arm: write-local-test | ||
| - taxonomy-departure-reason: the proven suite cannot yet exercise this host API | ||
| ---- | ||
|
|
||
| `accepted-until`:: An expiry. Once passed, the entry fails the runner even while | ||
| holding under its ceiling. Debt without an expiry is debt nobody revisits — the | ||
| 697-issue pile is what that looks like. | ||
|
|
||
| [[testing-taxonomy-choice]] | ||
| === Testing-taxonomy choice encoding | ||
|
|
||
| A Debtfile entry that tolerates the non-default arm of a testing-taxonomy choice | ||
| MUST use the dedicated `taxonomy-*` fields shown above. `taxonomy-choice` is the | ||
| literal `non-default`; `taxonomy-default-arm` names the elegant, long-term-correct | ||
| arm; `taxonomy-non-default-arm` names the different arm actually chosen; and | ||
| `taxonomy-departure-reason` states why that departure is being tolerated now. | ||
|
Comment on lines
+164
to
+168
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Use one canonical testing-taxonomy metadata record shape. The specification requires
📍 Affects 2 files
🤖 Prompt for AI Agents |
||
|
|
||
| These values MUST NOT be hidden in `description` or `tracking`: those fields | ||
| describe the debt and point to its work item, respectively, and neither identifies | ||
| the rejected arm unambiguously. The structural validator rejects a partial choice | ||
| record, an unknown `taxonomy-choice` value, empty arm or reason values, and identical | ||
| default and non-default arms. The runner does not interpret this governance | ||
| metadata; its `--write` pass preserves it unchanged while updating only `count` and | ||
| `ceiling`. | ||
|
|
||
| [[probe-discipline]] | ||
| == Probe discipline | ||
|
|
||
|
|
@@ -326,7 +368,7 @@ just debt-ratchet-down # re-measure and write back (lowers ceilings only) | |
| Three suites under `scripts/tests/`, discovered automatically by | ||
| `.github/workflows/self-test.yml`: | ||
|
|
||
| * `debtfile-structure-test.sh` — 14 cases | ||
| * `debtfile-structure-test.sh` — 19 cases | ||
| * `run-debtfile-test.sh` — 16 cases | ||
| * `debt-ratchet-test.sh` — 12 cases | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,11 +45,13 @@ | |
| seen_ids=" " | ||
|
|
||
| name="" probe="" count="" ceiling="" severity="" policy="" accepted="" | ||
| taxonomy_seen=0 taxonomy_choice="" taxonomy_default="" taxonomy_non_default="" taxonomy_reason="" | ||
|
|
||
| note() { printf ' %s\n' "$*"; } | ||
| bad() { printf ' ❌ %s\n' "$*"; fail=1; } | ||
|
|
||
| is_uint() { case "${1:-}" in ''|*[!0-9]*) return 1;; *) return 0;; esac; } | ||
| has_nonspace() { case "${1:-}" in *[![:space:]]*) return 0;; *) return 1;; esac; } | ||
|
|
||
| validate() { | ||
| [ -n "$name" ] || return 0 | ||
|
|
@@ -90,6 +92,20 @@ | |
| *) bad "'$name' policy '$policy' is not one of remediable|flag-only" ;; | ||
| esac | ||
|
|
||
| if [ "$taxonomy_seen" -ne 0 ]; then | ||
|
Check failure on line 95 in scripts/check-debtfile-structure.sh
|
||
| case "$taxonomy_choice" in | ||
| non-default) ;; | ||
| '') bad "'$name' has taxonomy choice fields but no '- taxonomy-choice: non-default'" ;; | ||
| *) bad "'$name' taxonomy-choice '$taxonomy_choice' is not 'non-default'" ;; | ||
| esac | ||
| [ -n "$taxonomy_default" ] || bad "'$name' has no '- taxonomy-default-arm:'" | ||
|
Check failure on line 101 in scripts/check-debtfile-structure.sh
|
||
| [ -n "$taxonomy_non_default" ] || bad "'$name' has no '- taxonomy-non-default-arm:'" | ||
|
Check failure on line 102 in scripts/check-debtfile-structure.sh
|
||
| [ -n "$taxonomy_reason" ] || bad "'$name' has no '- taxonomy-departure-reason:'" | ||
|
Check failure on line 103 in scripts/check-debtfile-structure.sh
|
||
| if [ -n "$taxonomy_default" ] && [ "$taxonomy_default" = "$taxonomy_non_default" ]; then | ||
|
Check failure on line 104 in scripts/check-debtfile-structure.sh
|
||
| bad "'$name' taxonomy-default-arm and taxonomy-non-default-arm must name different arms" | ||
|
Comment on lines
+101
to
+105
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win Enforce and test the documented taxonomy arm grammar. The validator accepts whitespace and space-containing arm values, while the specification requires stable identifiers matching
🧰 Tools🪛 GitHub Check: SonarCloud Code Analysis[failure] 103-103: Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich. [failure] 101-101: Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich. [failure] 104-104: Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich. [failure] 104-104: Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich. [failure] 102-102: Use '[[' instead of '[' for conditional tests. The '[[' construct is safer and more feature-rich. 📍 Affects 2 files
🤖 Prompt for AI Agents |
||
| fi | ||
| fi | ||
|
|
||
| if [ -n "$accepted" ]; then | ||
| case "$accepted" in | ||
| [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]) ;; | ||
|
|
@@ -100,7 +116,10 @@ | |
| fi | ||
| } | ||
|
|
||
| reset_block() { name="$1"; probe=""; count=""; ceiling=""; severity=""; policy=""; accepted=""; } | ||
| reset_block() { | ||
|
Check warning on line 119 in scripts/check-debtfile-structure.sh
|
||
| name="$1"; probe=""; count=""; ceiling=""; severity=""; policy=""; accepted="" | ||
| taxonomy_seen=0; taxonomy_choice=""; taxonomy_default=""; taxonomy_non_default=""; taxonomy_reason="" | ||
| } | ||
|
|
||
| while IFS= read -r raw || [ -n "$raw" ]; do | ||
| line="${raw#"${raw%%[![:space:]]*}"}" | ||
|
|
@@ -111,6 +130,14 @@ | |
| '- ceiling: '*) ceiling="${line#- ceiling: }" ;; | ||
| '- severity: '*) severity="${line#- severity: }" ;; | ||
| '- policy: '*) policy="${line#- policy: }" ;; | ||
| '- taxonomy-choice:'*) | ||
| taxonomy_seen=1; taxonomy_choice="${line#- taxonomy-choice:}"; taxonomy_choice="${taxonomy_choice# }" ;; | ||
| '- taxonomy-default-arm:'*) | ||
| taxonomy_seen=1; taxonomy_default="${line#- taxonomy-default-arm:}"; taxonomy_default="${taxonomy_default# }" ;; | ||
| '- taxonomy-non-default-arm:'*) | ||
| taxonomy_seen=1; taxonomy_non_default="${line#- taxonomy-non-default-arm:}"; taxonomy_non_default="${taxonomy_non_default# }" ;; | ||
| '- taxonomy-departure-reason:'*) | ||
| taxonomy_seen=1; taxonomy_reason="${line#- taxonomy-departure-reason:}"; taxonomy_reason="${taxonomy_reason# }" ;; | ||
| '- accepted-until: '*) accepted="${line#- accepted-until: }" ;; | ||
| esac | ||
| done < "$DEBT" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.