Keep durable fav unregistered and fail-closed; CLI only prints status and remaining-port inventory without destructive backfill/recover commands. Co-authored-by: Cursor <cursoragent@cursor.com>
58 lines
1.7 KiB
Go
58 lines
1.7 KiB
Go
// Command artifact-vault is the FAV operator CLI stub for U7 incremental.
|
|
//
|
|
// Full backfill / inventory / recover-apply / destroy live on
|
|
// feature/final-artifact-vault and were NOT whole-branch merged. This binary
|
|
// compiles on current dev and stays non-destructive: it only prints status /
|
|
// remaining-port inventory.
|
|
package main
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
func main() {
|
|
if len(os.Args) < 2 {
|
|
usage()
|
|
os.Exit(2)
|
|
}
|
|
switch os.Args[1] {
|
|
case "status", "version":
|
|
writeJSON(map[string]any{
|
|
"binary": "artifact-vault",
|
|
"slice": "u7-incremental-stub",
|
|
"publisher_default": false,
|
|
"degraded_read": false,
|
|
"consumer": "fav",
|
|
"consumer_mode": "off",
|
|
"remaining_to_port": []string{
|
|
"enumerate.go (EnumerateTerminals / LoadExclusions)",
|
|
"TerminalRow + Backfill(rows) API (diverged from dataset Candidate path)",
|
|
"full recover-plan / recover-apply / gc-preflight / destroy",
|
|
"server ingest hooks (OnFinalArtifact*)",
|
|
"durable fav event Register after separate approval",
|
|
},
|
|
"source_branch": "feature/final-artifact-vault",
|
|
"note": "do not enable FAV_DEGRADED_READ or fav consumer without approval",
|
|
})
|
|
case "help", "-h", "--help":
|
|
usage()
|
|
default:
|
|
fmt.Fprintf(os.Stderr, "artifact-vault: unknown command %q (full CLI remains on feature/final-artifact-vault)\n", os.Args[1])
|
|
usage()
|
|
os.Exit(2)
|
|
}
|
|
}
|
|
|
|
func usage() {
|
|
fmt.Fprintln(os.Stderr, "usage: artifact-vault <status|version|help>")
|
|
fmt.Fprintln(os.Stderr, "U7 stub only — backfill/recover/destroy not ported; fav stays off")
|
|
}
|
|
|
|
func writeJSON(v any) {
|
|
enc := json.NewEncoder(os.Stdout)
|
|
enc.SetIndent("", " ")
|
|
_ = enc.Encode(v)
|
|
}
|