Repository navigation
Phase 0: ADR 0142 (license identification, decision card, lineage reliability) - #2458
Merged
neuromechanist merged 7 commits intoNov 27, 2026
Conversation
Records the owner decisions of 2026-11-27 for epic #2449, with its index line. ADR index test passes.
Dated pointer amendments. ADR index test passes.
Owner decision of 2026-11-27. Decision rule and threshold set from ScanCode 32.5.0 runs on real CC texts, riders and notices; the pointer amendments and index follow. ADR index test passes.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR2458Version: 🤖 Updated on each push. |
Auto-deny exclusion for matches_other, longest-match rule, compound results, sandboxed ScanCode step, three ordered deploys, next actions. ADR index test passes.
Round 2: writable scan paths, warmed index, blob extraction, output checks, sudo requirement, unavailable reported. ADR index test passes.
…-card' into feature/issue-2450-phase0-adr-0142 # Conflicts: # .context/decisions/0102-a-publication-request-gets-a-derived-verdict-and-approving-a-non-pass-is-the-administrators-recorded-act.md
neuromechanist
merged commit Nov 27, 2026
bfe7548
into
feature/issue-2449-epic-decision-card
22 checks passed
neuromechanist
added a commit
that referenced
this pull request
Nov 27, 2026
Supersedes the last clause of ADR 0121 decision 10 and refines ADR 0141 decisions 3 and 4 (pointers in both); the 0141 amendment added earlier on this branch is folded into it. Tolerates the 0142 gap that PR #2458 reserves. Tested: adr-index unit test.
neuromechanist
added a commit
that referenced
this pull request
Nov 27, 2026
* Hand unstaged BIDS runs the tag commit A nemar-ica run of the archive with no serving index staged got no --source-commit, so its record stated no commit, its stamp had no input digest and its derivative was skipped for good (no_input_digest). The staging answer now carries the tag's commit whenever it was read, and the job spec hands it as --source-commit with or without an index. Tested: serving-index-staging, compute-derivatives (nemar-ica cases), compute-serving-index-contract; each new case fails with the fix reverted. * Amend ADR 0141: unstaged runs get the tag commit Names the mechanism decision 6 always implied: a run staged without a serving index is handed --source-commit and the tag's commit whenever it was read, so its derivative is keyed none and stored. Tested: adr-index unit test. * Agree on a skipped derivative in every view The grid and a run's detail read the stored checkpoint from a progress row that only the stamp sync resolved, so after the derivative store skipped a run they showed it pending until the next sync, and coverage counted it complete. The store's pass now resolves the stored rows it decided, and coverage complete excludes a run whose decided stored row did not keep every recording. Tested: compute-derivatives (new view cases), compute-progress-reconcile, compute-pipeline-grid, quality-admin-route; both parts revert-checked. * Changelog: unstaged BIDS commit, stored views Not tested: changelog text only. * Move the source commit case before the index args Keeps the new case apart from the nemar-ica placeholder case, which a parallel change edits. Tested: compute-serving-index-contract unit test (13 pass). * Import the stored resolver statically The read bounds and the derivative object prefix move to a leaf module the progress and quality modules read, so the store imports resolveDecidedStored at the top with no cycle; the dynamic import and its catch, which only guarded the module load, are gone. Tested: compute-derivatives, compute-progress-reconcile, quality suites (252 pass). * Key a BIDS stamp only by the commit it was handed keyStamp trusted the record's git: digest. When the recorded spec hands --source-commit, the stamp's digest must be exactly git:<that commit>; another commit, or two handed, is digest_mismatch. Tested: compute-derivatives (98 pass); the two mismatch cases fail with the check removed. * Hand every BIDS run its tag commit, or defer it Every Worker-dispatched run of the archive, nemar-floor included, now reads its version's tag commit at dispatch and gets --source-commit. A GitHub fault defers the run (source_commit_deferred, a refused stamp, no end; it stops the queue); an absent tag refuses it (version_tag_absent, nothing written). Staging is handed the commit and reads only the index. Suites that dispatch a BIDS run use a GitHub tag stand-in (helpers/github-tags.ts). The coverage case now uses a genuinely unkeyable run (digest_mismatch), as does the CLI help. Tested: 29 backend compute and quality suites (1059 pass) plus the callback, cron, sweep, metadata and CLI suites; revert-checked. * ADR 0143: BIDS runs get their tag commit Supersedes the last clause of ADR 0121 decision 10 and refines ADR 0141 decisions 3 and 4 (pointers in both); the 0141 amendment added earlier on this branch is folded into it. Tolerates the 0142 gap that PR #2458 reserves. Tested: adr-index unit test. * Changelog: every BIDS run gets its tag commit Not tested: changelog text only. * Keep refused BIDS heads from stalling the queue Only a GitHub credential fault (no_github_credentials, token_mint_ failed) stops a run over the queue, and it ends the daily tick; a github_unreadable deferral is one repository's and is passed over. A run asks for PIPELINE_RUN_EXTRA_TRIES (10) candidates beyond its room, so datasets refused for a missing tag or deferred never fill it. The tag stand-in now answers both tag spellings. Tested: compute-pipeline-queue (33 pass); each new case fails with its mutation. * Keep the index deferral clock across commit waits A source_commit_deferred stamp no longer counts as another kind in SERVING_INDEX_DEFERRAL_AGE_SQL, so it does not restart the 24 hours. Tested: serving-index-staging (79 pass); the new case fails when the word is counted as another kind. * ADR 0143: only credential faults stop the queue Narrows decision 2, adds the extra tries to decision 3 and the clock to decision 5; index line and changelog follow. Tested: adr-index unit test.
neuromechanist
added a commit
that referenced
this pull request
Nov 27, 2026
…e tag's (#2464) * Hand unstaged BIDS runs the tag commit A nemar-ica run of the archive with no serving index staged got no --source-commit, so its record stated no commit, its stamp had no input digest and its derivative was skipped for good (no_input_digest). The staging answer now carries the tag's commit whenever it was read, and the job spec hands it as --source-commit with or without an index. Tested: serving-index-staging, compute-derivatives (nemar-ica cases), compute-serving-index-contract; each new case fails with the fix reverted. * Amend ADR 0141: unstaged runs get the tag commit Names the mechanism decision 6 always implied: a run staged without a serving index is handed --source-commit and the tag's commit whenever it was read, so its derivative is keyed none and stored. Tested: adr-index unit test. * Agree on a skipped derivative in every view The grid and a run's detail read the stored checkpoint from a progress row that only the stamp sync resolved, so after the derivative store skipped a run they showed it pending until the next sync, and coverage counted it complete. The store's pass now resolves the stored rows it decided, and coverage complete excludes a run whose decided stored row did not keep every recording. Tested: compute-derivatives (new view cases), compute-progress-reconcile, compute-pipeline-grid, quality-admin-route; both parts revert-checked. * Changelog: unstaged BIDS commit, stored views Not tested: changelog text only. * Move the source commit case before the index args Keeps the new case apart from the nemar-ica placeholder case, which a parallel change edits. Tested: compute-serving-index-contract unit test (13 pass). * Import the stored resolver statically The read bounds and the derivative object prefix move to a leaf module the progress and quality modules read, so the store imports resolveDecidedStored at the top with no cycle; the dynamic import and its catch, which only guarded the module load, are gone. Tested: compute-derivatives, compute-progress-reconcile, quality suites (252 pass). * Key a BIDS stamp only by the commit it was handed keyStamp trusted the record's git: digest. When the recorded spec hands --source-commit, the stamp's digest must be exactly git:<that commit>; another commit, or two handed, is digest_mismatch. Tested: compute-derivatives (98 pass); the two mismatch cases fail with the check removed. * Hand every BIDS run its tag commit, or defer it Every Worker-dispatched run of the archive, nemar-floor included, now reads its version's tag commit at dispatch and gets --source-commit. A GitHub fault defers the run (source_commit_deferred, a refused stamp, no end; it stops the queue); an absent tag refuses it (version_tag_absent, nothing written). Staging is handed the commit and reads only the index. Suites that dispatch a BIDS run use a GitHub tag stand-in (helpers/github-tags.ts). The coverage case now uses a genuinely unkeyable run (digest_mismatch), as does the CLI help. Tested: 29 backend compute and quality suites (1059 pass) plus the callback, cron, sweep, metadata and CLI suites; revert-checked. * ADR 0143: BIDS runs get their tag commit Supersedes the last clause of ADR 0121 decision 10 and refines ADR 0141 decisions 3 and 4 (pointers in both); the 0141 amendment added earlier on this branch is folded into it. Tolerates the 0142 gap that PR #2458 reserves. Tested: adr-index unit test. * Changelog: every BIDS run gets its tag commit Not tested: changelog text only. * Stage an index ahead of its tag by NEMAR metadata One GitHub compare of the tag's commit and the index's admits an index whose commit is ahead by .nemar/, .github/ and .gitattributes paths only; the spec records ahead_of_tag (both commits, changed paths) and the run is handed the index's commit, the one the recipe accepts. Behind, diverged, content changes and unlisted deltas are refused with their own words; an unread compare defers. Keying checks the handed commit is the admitted one. Tested: serving-index-staging (96), compute-derivatives (100), the contract unit tests and the compute suites (1127 pass); revert-checked. * ADR 0144: admit an index ahead by NEMAR metadata Supersedes ADR 0141 decision 2 in part, refines ADR 0143 decision 1 and ADR 0123 decision 3 for such a run; pointers in 0141 and 0143. Tested: adr-index unit test. * Changelog: metadata-ahead serving index Not tested: changelog text only. * Keep refused BIDS heads from stalling the queue Only a GitHub credential fault (no_github_credentials, token_mint_ failed) stops a run over the queue, and it ends the daily tick; a github_unreadable deferral is one repository's and is passed over. A run asks for PIPELINE_RUN_EXTRA_TRIES (10) candidates beyond its room, so datasets refused for a missing tag or deferred never fill it. The tag stand-in now answers both tag spellings. Tested: compute-pipeline-queue (33 pass); each new case fails with its mutation. * Keep the index deferral clock across commit waits A source_commit_deferred stamp no longer counts as another kind in SERVING_INDEX_DEFERRAL_AGE_SQL, so it does not restart the 24 hours. Tested: serving-index-staging (79 pass); the new case fails when the word is counted as another kind. * ADR 0143: only credential faults stop the queue Narrows decision 2, adds the extra tries to decision 3 and the clock to decision 5; index line and changelog follow. Tested: adr-index unit test. * Keep an admitted index the tag's; read patches Owner ruling: the run is the tag's. An index admitted ahead of its tag is handed with the tag's commit (--source-commit T) and keyed git:T; its own commit is provenance in ahead_of_tag (tag_commit, index_commit, changed_path_count, renamed from changed_paths). recipeJobSpec refuses an admission compared with another tag commit, or one ahead by nothing; StagedServingIndex drops its duplicate sourceCommit; keyStamp checks the handed commit is the recorded tag_commit. A .gitattributes edit is admitted only when its patch adds or removes no eol=crlf, working-tree-encoding, ident or non-annex filter, and refused unlisted without a patch. An over-bound compare is index_delta_unlisted, not a fault. The nemar-process arguments that let the recipe use an admitted index come in a later commit. Tested: serving-index-staging (116), compute-derivatives (100) and 14 more compute suites (834 pass in all), root contract, recipe, adr and CLI tests (146); seven revert checks. * ADR 0144: the run is the tag's; patch rule Hand T, keep S as provenance, state the owner's invariant, correct the claim that .gitattributes never changes bytes, say why the rule differs from ZARR_SOURCE_DELTA_ROOTS, and note that an unanswerable compare costs one 24-hour deferral. Renamed for the new title. Tested: adr-index unit test. * Attest an admitted index to the recipe The plumbing for nemarOrg/nemar-process#108: a run handed an index ahead of its tag keeps --source-commit T and adds --serving-index- commit S and one --serving-index-delta-path per changed path (old names of renamed files included, each once, code-unit order). A job's 64 arguments fit 24 paths, so admission refuses a larger delta as index_delta_unlisted instead of cutting it; a path with no UTF-8 form is refused. keyStamp keys such a run only when the arguments attest the recorded index commit and path count, and attest nothing when no index ahead of its tag was staged. The marker is gone. Tested: serving-index-staging (120), compute-derivatives (105), 14 more compute suites (843 pass), contract/recipes/adr/CLI unit (160), the drift test against nemar-process dev and #108 (16 each); six revert checks. * ADR 0144: the attestation arguments, 24 paths Tested: adr-index unit test. * Admit .gitattributes edits by an allow-list A block-list admitted !eol, -eol, -text and macro uses that change checkout bytes when CR LF conversion is in effect. Every attribute of every added or removed line, macro definitions included, must now be annex.* or diff/merge (any form), filter=annex, or text, binary, eol=lf set; any patch line, context included, that can turn CR LF on (eol=crlf, legacy crlf) refuses the edit. Lines starting +++ or --- are no longer skipped: a compare patch has hunk lines only. Tested: serving-index-staging (135 pass); the old block-list fails 7 cases, skipping +++/--- fails 2, dropping the context check fails 1. * Note the launch bytes of long non-ASCII paths Not tested: comment only. * ADR 0144: allow-list, deploy order after #2462 Tested: adr-index unit test. * Read each changed .gitattributes whole at S The patch shows only touched lines and a little context, so an unchanged eol=crlf line elsewhere in the file went unseen. Each changed .gitattributes the edit leaves at the index's commit is now read whole (GitHub contents at S, 1 MiB bound; a deleted file is skipped, a renamed one read under its new name) and any line, macro definitions too, that turns CR LF on refuses the index. A file that cannot be read whole is github_unreadable and defers. The stand-in answers contents. Tested: serving-index-staging (139), compute-derivatives (105) and six more compute suites; dropping the read fails 3 cases. * Docs: whole-file .gitattributes read, its cost Tested: adr-index unit test. * List every .gitattributes at S and read each * Docs: every .gitattributes read, its bound
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds ADR 0142, recording the owner decisions of 2026-11-27 for the administrator decision card: the review job identifies the root LICENSE with ScanCode toolkit 32.5.0, installed with uv from a hashed requirements file and recorded as scancode-32.5.0+spdx-3.27; the closed fact license_file with its additions rule; report and prompt version 3 in two releases; lineage reliability; the Worker-built decision card; the withheld description key; and the outline of the docs.nemar.org /platform/license-check page.
The decision rule comes from ScanCode runs on real texts (the CC 4.0 family and CC0 from SPDX and creativecommons.org, riders, notices and NEMAR's generated notice), tabled in the ADR. askalono, the first draft's matcher, was rejected by the owner (archived, 2022 data, does not separate CC siblings) and is now an alternative.
It partially supersedes ADR 0102 (section 3's LICENSE bullet and section 5's lowering rule for a cut LICENSE) and extends ADR 0139 (decision 9's record gains the matcher version, decision 7's lineage gains resolved_at). Dated pointer amendments are added at the ends of both, and the index lists ADR 0142.
Tested: bun test test/adr-index.unit.test.ts passes (11 tests). The first two commits carry a [skip ci] marker by mistake; the squash message should drop it.
Closes #2450
Part of epic #2449