Repository navigation
feat(managed): https sources, the credential command and the apply report [skip release] - #418
Merged
Merged
Conversation
…port A managed source can now be an https:// URL. Apply fetches the state and each listed archive over https, with size limits and only https redirects. - credential_command: run without a shell from the configuration folder, 30 s at most; its first line is a bearer token sent only to the source's origin. A failure or a 401 falls back to the cached state and reports that a sign-in is needed. Without a terminal, FASTSKILL_INTERACTIVE=0. - report_url: each apply sends a fixed JSON report (agents, skill entries and outcomes, quarantine, refusals, project skills) with a rising sequence; an accepted report clears the refusals it carried. - request_url and report_url on another origin are ignored with a warning; a file source ignores editable, request_url and report_url, and managed status names them. - managed status shows sign-in needed, ignored fields and where reports go; managed status --json --report prints the next report body.
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.
Summary
Slice F4 of ADR-0016 (signed managed state): a managed source can be an
https://URL.https://(at most 10).credential_command(decision 6): runs without a shell from the configuration folder, 30 s at most. Its first line (≤ 16 KiB) is a bearer token, sent only to the source's origin; a redirect to another origin drops it. A failure or a401falls back to the cached state and reports sign-in needed. Without a terminal,FASTSKILL_INTERACTIVE=0is set. Errors never include what the command printed.report_urlon the source's origin, each apply POSTs a fixed JSON body (agents, skill entries with outcomes, quarantine, refusals, project skills) with a sequence that goes up by one each time. An accepted report clears the refusals it carried. Refusals are recorded by the install gate for an unexpired https state, with the command name only.report_url/request_urlon another origin are ignored with a warning. A file source ignoreseditable,request_urlandreport_url, andmanaged statusnames them.managed status: shows sign-in needed, ignored fields, where reports go and last-apply warnings.--json --reportprints only the next report body.webdocs/cli-reference/managed-command.mdxcovers sources, the credential command, https-only fields and the report.Test plan
remote_tests: token from the first line; sent to the source origin only; dropped on a cross-origin redirect; http redirect refused; redirect loop stops; 401 → sign-in, 500/404 → not; size limits; credential command failures (exit code, empty, too much output, bad bytes, can't start) never leak output; working folder andFASTSKILL_INTERACTIVE.report_testsagainst a local TLS server: https apply deploys and reports with sequence 1 then 2; refusals cleared on acceptance and kept on failure; failed sign-in uses the cache and sends no report; token reaches state, artifacts and report; off-origin URLs warn; file source ignored fields; snapshot outcomes (adopted, collision, unmanaged editable, quarantined); refusals recorded only for an unexpired https state.status --reportbody andstatus --json --report.cargo clippy --workspace --all-targets --all-features -- -D warningscargo nextest run --workspace --all-features: 2207 passedscripts/check-modified-rust-coverage.py)