Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
30c3b57
docs(intake): verify actual license grant before technical candidate …
xLagerFeuer Oct 23, 2026
1cfb65d
docs(intake): verify actual license grant before technical candidate …
xLagerFeuer Oct 23, 2026
095e749
docs(intake): verify actual license grant before technical candidate …
xLagerFeuer Oct 23, 2026
6b06726
docs(publication): separate automatable checks from reserved contribu…
xLagerFeuer Oct 23, 2026
6e49aca
feat(intake): add read-only source licensing and policy preflight
xLagerFeuer Oct 23, 2026
1e6acb7
feat(intake): add read-only source licensing and policy preflight
xLagerFeuer Oct 23, 2026
504cfbb
feat(intake): add read-only source licensing and policy preflight
xLagerFeuer Oct 23, 2026
0b7d8a0
docs(intake): link verifiable preflight to screening and publication
xLagerFeuer Oct 23, 2026
fee8cd9
docs(intake): link verifiable preflight to screening and publication
xLagerFeuer Oct 23, 2026
26dfe62
feat(intake): inspect nested policy and paginated closed PRs; reconci…
xLagerFeuer Oct 23, 2026
4d59916
chore(intake): keep publication receipts owned by PR #110
xLagerFeuer Oct 23, 2026
e93bc5e
fix(intake): recognize and pin dual-license root files
xLagerFeuer Oct 23, 2026
3739c9f
test(intake): cover dual-license source receipts
xLagerFeuer Oct 23, 2026
7928c0b
docs(intake): explain complete dual-license evidence
xLagerFeuer Oct 23, 2026
6494c51
Merge current Upstream main into PR #111; preserve S1 and publication…
xLagerFeuer Nov 8, 2026
2753490
Merge current main and reconcile license-first intake gates
xLagerFeuer Nov 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/ASSESSMENT_CANDIDATE_BATCHES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

**Read-only all-lane status:** [Harness Status](../HARNESS_STATUS.md) groups work as harness → intervention → external PR, preserving these batch manifests as historical technical records. `python3 scripts/harness_status.py --filter actionable` is an inventory view, **not** an authorized publication scheduler or fresh source/PR verification. See the [source hierarchy](HARNESS_STATUS_MODEL.md).

**Machine-assisted license-first intake:** use the [read-only candidate preflight](CANDIDATE_INTAKE_PREFLIGHT.md) at the beginning of a new candidate review, before any derivative patch or fork. It captures actual root license text, source SHA, contributor hints and bounded duplicate-title observations. `LICENSE_REVIEW_REQUIRED` is evidence **for** a subsequent license compatibility decision, never an automatic `LICENSE_ELIGIBLE` decision or write authorization. The preflight does not replace the five-source batch CAS, native fit checks or external-stage grants.

**Continuous working-fork link:** after each admitted technical batch or
updated handoff, regenerate the [source → fork intent registry](../data/contribution-workspaces/registry.json)
with `python3 scripts/contribution_workspaces.py sync` in the same internal
Expand Down Expand Up @@ -60,7 +62,7 @@ Within this expressly selected **#56 experiment** and its explicitly chosen `ups

1. **Bootstrap:** refresh VSM-OSS `START_HERE.md`, the current Index, this repository's default branch, #56 and #6. Use the **already frozen batch** unless the whole batch is resolved; never silently re-pin historical assessment identities.
2. **Freeze intake before execution:** select a bounded, full cohort (normally **five** assessment records, up to ten) from the canonical *included* Index corpus. Record one exact Index SHA, each assessment path, assessed upstream repo/ref, source-derived question and fixed order. For prospective `ASSESSMENT_DERIVED`, commit or otherwise timestamp the predicted native weakness, expected benefit and null/falsifier **before** investigating the target's fresh code/issues; a later VSM explanation is not derived-origin evidence. Check for duplicate prior candidates/interventions. This is a **screening cohort**, *not* a claim that five useful patches are known or that five S1 work items are admitted. Never pad with unassessed GitHub favourites.
3. **Screen in order:** for the first `SCREENING` or `ACTIVE` row, independently inspect current upstream source, issue/PR overlap, policy/licensing and native tests; record the four fit gates (`need`, `mechanism`, `counterfactual`, `scope`) and dated primary-source links. A VSM grade alone is not a bug. If fit fails, `CLOSED_NO_CHANGE` with evidence; if insufficient, `BLOCKED_EVIDENCE` with the missing input.
3. **Screen in order — license first for derivatives:** run the [read-only preflight](CANDIDATE_INTAKE_PREFLIGHT.md) and independently inspect the actual current upstream `LICENSE`/NOTICE text, source SHA, redistribution compatibility and contributor requirements **before preparing a derivative patch or public fork**. Record the source link and `LICENSE_ELIGIBLE` / `LICENSE_BLOCKED` / `LICENSE_UNRESOLVED` decision separately; the preflight's `LICENSE_REVIEW_REQUIRED` is not clearance. If the license grant cannot be established, do not copy, modify or publish upstream code; record `BLOCKED_EVIDENCE`. Then independently inspect current source, issue/PR overlap and native need, and record the four fit gates (`need`, `mechanism`, `counterfactual`, `scope`) with dated primary-source links. Preserve the prospective hypothesis chronology from step 2. A VSM grade alone is not a bug. If fit fails, `CLOSED_NO_CHANGE` with evidence; if insufficient, `BLOCKED_EVIDENCE` with the missing input.
4. **Execute a qualified case:** only after four `PASS` gates and a falsifiable source-derived plan, require relevant **native deterministic scripts** against pinned genuine product code, matched baseline/after and controls. For prospective strict-derived cases, dispatch them to a distinct CI/runner and verify its first-party source/test pins, run URL, commands, logs and controls; when unavailable record `BLOCKED_INDEPENDENT_EXECUTION`, not a chatbot-executed benefit claim. **Never** run live LLM agents, Browser quality trials or provider calls for this experiment. Track origin class separately (`ASSESSMENT_DERIVED`, `ASSESSMENT_INFORMED`, `GENERAL_UPSTREAM`, `INSUFFICIENT`) and never retroactively improve it.
5. **Return then advance:** when a valid local test/patch/handoff is complete and external fork/PR authority is unavailable, mark **`AWAITING_EXTERNAL`** with the precise prepared packet and unexercised right, then immediately continue to the **next** eligible row. `AWAITING_EXTERNAL` is **not** a closed contribution, not a denial and not evidence of external delivery. Revisit it only after a new, attributable grant, a fresh maintainer response, or an explicit targeted command. A genuine unresolvable policy conflict may end in `ESCALATED`, without blocking unrelated candidate screening.
6. **Batch rollover:** only when no eligible rows remain, produce an evidence-backed batch summary and select the next **complete** frozen cohort from fresh canonical Index evidence. Do not reinsert screened or deferred candidates into the new batch without an explicit, documented revisit decision. If there are insufficient eligible assessments, state `NO_ELIGIBLE_ASSESSMENT_CANDIDATE` without a manufactured batch.
Expand Down
2 changes: 1 addition & 1 deletion docs/ASSESSMENT_TO_IMPROVEMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Do not promote `ASSESSMENT_INFORMED` into `ASSESSMENT_DERIVED` by finding a post

1. **Index-first discovery (positive evidence):** refresh the *current canonical Index default branch*; independently select an included assessment before picking an upstream fix or favorite fork; pin Index commit, assessment path, its assessed target `review_ref`, function and exact source-backed decision/feedback owner/constraint. Preserve dated snapshots; a historical assessment never claims the source is still unchanged.
2. **Function-to-mechanism hypothesis (positive evidence):** *before fresh target-code/issue inspection*, preserve the dated hypothesis checkpoint described above. Identify what operational loop does not close as required, which actor currently makes the decisive decision, the specific mechanism proposed to change behavior, expected native benefit and a plausible failure/null outcome. Explain *why the assessment finding predicts/selects this mechanism*, independently of any prospective VSM grade.
3. **Native need/fit (independent evidence):** inspect current target default branch and its genuine contribution target (which can be a distinct `development` branch), first-party code, maintainer signal/issue/PR overlap, licensing/DCO/CLA rules, product scope and impact. Record `PASS`, `PENDING` or `FAIL` separately for **need, mechanism, counterfactual benefit, scope**. A VSM diagnosis or issue citation alone cannot make these pass.
3. **Native need/fit (independent evidence):** **first check current upstream license text, notices and planned derivative/redistribution compatibility before derivative code or fork preparation**; missing GitHub license metadata alone is inconclusive, but no actual applicable grant means no public derivative fork/patch. The read-only intake preflight supplies evidence, not automatic license clearance. Then inspect the current target default branch and its genuine contribution target (which can be a distinct `development` branch), first-party code, maintainer signal/issue/PR overlap, DCO/CLA/contributor rules, product scope and impact. Record `PASS`, `PENDING` or `FAIL` separately for **need, mechanism, counterfactual benefit, scope**. A VSM diagnosis or issue citation alone cannot make these pass.
4. **Before/after script protocol (before implementing):** freeze deterministic native test inputs, baseline source SHA, environment, metric/observable, sample or repeated-trial plan, effect threshold or acceptance condition, safety/rollback checks, expected regressions and confounders. Select metrics from the actual function: e.g. preserved concurrent writes, CLI recovery outcome, refusal of unsafe source actions or reliability *where relevant*. Do not impose arbitrary agent autonomy or score-driven targets.
5. **Independent native scripted test and repair:** have the separate deterministic runner demonstrate the pre-change failure/shortfall against actual product source through reproducible scripts; implement one scoped upstream-native change; have the runner re-run the matched workload against changed code and native regressions, and inspect its receipts. Retain exact code, tests, commands, observations and failed attempts. Do not substitute a mock-only pass for a real product-code path. A green CI alone proves checks ran, **not that a deployed/user benefit was measured**. Do not add live LLM agents as an extra verification step.
6. **Decision and outcome:** compare pre/post observations and evidence limits. State `BENEFIT_SUPPORTED`, `NO_BENEFIT_OBSERVED` or `INCONCLUSIVE`, plus functional mechanism effect and whether any authority/decision owner changed. No self-awarded reclassification of Index grades. If scope/policy is incompatible, return `NO_ELIGIBLE_ASSESSMENT_CANDIDATE` / `BLOCKED_EVIDENCE` instead of swapping to a convenient unrelated issue.
Expand Down
51 changes: 51 additions & 0 deletions docs/CANDIDATE_INTAKE_PREFLIGHT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Read-only candidate intake preflight

**Owner:** `opensiro/upstream` / experiment [#56](https://github.com/opensiro/upstream/issues/56). **Organizational route:** [VSM-OSS #285](https://github.com/opensiro/vsm-oss-organization/issues/285). This does not create a new S1 domain, permit publication, or change any VSM classification.

Use **before preparing a derivative patch, creating a fork or opening an external PR**. Run against the actual third-party upstream repository and pin its reported branch SHA:

```sh
python3 scripts/candidate_intake_preflight.py --source OWNER/REPO --topic 'bounded candidate description'
```

The script makes only unauthenticated, repository-scoped GitHub REST `GET` requests. It does not run an agent, model, Browser test, GitHub write, clone, download a credential, or grant copyright permission. Its deterministic unit tests use a fake GET responder.

## Evidence and interpretation

1. Check the public repository identity, default/selected branch and exact source SHA.
2. Enumerate root `LICENSE`/`LICENCE`/`COPYING`/`UNLICENSE` files, including named `LICENSE-MIT`, `LICENSE-APACHE`, and comparable common SPDX-family filename variants. Read the **actual content of every matched root license file** (not only the often-missing GitHub SPDX metadata) and emit each path and SHA-256 under `license.files`. If any matched file is missing, malformed, or empty, fail closed. Multiple license candidates require explicit scope review. Notices, vendored-code licenses, patent/trademark limits and proposed patch compatibility **still require human/source review**.
3. Only after verifying root license text, inspect eligible root policies plus `.github/` and `docs/` policy files and `.github/{ISSUE_TEMPLATE,PULL_REQUEST_TEMPLATE}/` text/YAML templates. Pin **all** file reads to the exact observed source commit SHA. Emit content digests and `{path,line,code,stage,excerpt}` evidence. Stage-specific `gates` summarize evidence and unresolved obligations; `NOT_CLEARED` never grants permission to implement, publish, mark ready or merge. This is a bounded enumeration, not proof that no policy exists elsewhere (including linked websites and repository discussions).
4. If `--topic` is supplied, traverse both **open and closed** issues and PRs using `state=all`, up to **30 pages of 100 records per endpoint** (checking the next page after an exactly full page). Search both titles and bodies for normalized topic-token overlaps (including partial similarities); filter PR entries from issue results. `INVENTORY_INCOMPLETE` explicitly records when the bounded limit is hit; a denied page fails closed as `INSUFFICIENT_EVIDENCE`. A complete inventory only establishes bounded lexical overlap, not the absence of semantic duplicates or a fix already merged under a different title.

## Stage boundaries and machine reasons

| Stage | Static evidence now gathered | Still required before actual stage transition |
| --- | --- | --- |
| `BEFORE_IMPLEMENTATION` | Source SHA, root license digest, issue/PR inventory, contributor issue/branch hints | Human or first-party-supported license compatibility decision, source-native defect and duplication check, any required issue assignment |
| `BEFORE_DRAFT` | Contributor DCO/CLA and Draft timing text | Genuine actor/authority/fork/branch verification, native RED→GREEN, diff/secret inspection, attestations and any explicit pre-Draft policy |
| `BEFORE_READY` | Ready-for-review and CI/test mentions | Required CI/reviews and author declaration at the applicable time; Draft may remain pending if policy permits |
| `BEFORE_MERGE` | Merge timing hints | Upstream maintainer, branch protection and review/CI gates; this mandate does not authorize merge |

Every gate contains `status` and `reasons`; clear reason codes include `ROOT_LICENSE_NOT_FOUND`, `SOURCE_EVIDENCE_UNVERIFIED`, `LICENSE_COMPATIBILITY_REVIEW_REQUIRED`, `POTENTIAL_DUPLICATE_REVIEW_REQUIRED` and `DUPLICATE_INVENTORY_INCOMPLETE`. Hints do not determine whether the upstream actually *requires* DCO, CLA, issue assignment or branch syntax. Resolve these using the first-party context and the correct stage; no machine text-match can certify consent.

| Machine status | Meaning | Next action |
| --- | --- | --- |
| `LICENSE_REVIEW_REQUIRED` (exit 0) | Public source/ref and **nonempty root license text** verified; bounded policy/overlap evidence gathered | Human/operator must still establish applicable grant and compatibility **before derivative work**; then evaluate the stage-specific gates |
| `LICENSE_BLOCKED` (exit 2) | No root license file observed | Do not make a derivative; investigate other license locations or obtain rights. **Not** a legal judgment that all use is forbidden |
| `INSUFFICIENT_EVIDENCE` (exit 2) | API denied/rate-limited, malformed, missing required content, SHA unverifiable, etc. | Preserve source error, retry/inspect first-party evidence without treating it as license absence |

**Never convert `LICENSE_REVIEW_REQUIRED` to `LICENSE_ELIGIBLE` automatically.** Human/legal provenance and context determine eligibility, and an SPDX label or apparent OSS license does not override repository-specific policy. No machine status verifies DCO/CLA attestation, external issue assignment, contributor identity, organization fork-write permission, permitted branch naming, CI gate timing or a right to merge.

The broader [candidate screening process](ASSESSMENT_CANDIDATE_BATCHES.md) owns the triaged `LICENSE_ELIGIBLE` / `LICENSE_BLOCKED` / `LICENSE_UNRESOLVED` verdict; [Corrective publication](CORRECTIVE_PR_PUBLICATION.md) rechecks it on current third-party sources at the publication stage. The already frozen 34-case queue remains unchanged, and running this preflight alone is **not** a publication attempt.

## Negative-test contract

The tests must prove that a metadata-only SPDX label cannot bypass absent root license text; 403/429/404 and malformed content never become eligibility; exact-SHA policy evidence, nested `.github/` discovery and line numbers work; fully paginated open/closed issues and PRs are checked and page-budget exhaustion is reported; invalid repo/branch/topic input never reaches the network; CLI has no `--execute` or mutation mode. Run:

```sh
python3 -m unittest discover -s tests -p 'test_candidate_intake_preflight.py' -v
python3 -m unittest discover -s tests -p 'test_fork_public_preflight.py' -v
python3 scripts/corrective_publication_queue.py validate
```

This is **phase 1, read-only preflight**. Authenticated issue/workflow gates and publication permission checks must be implemented and verified separately under the [organizational change protocol](https://github.com/opensiro/vsm-oss-organization/pull/286) before any new write automation is enabled.
Loading
Loading