-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(ci): the invisible-character gate never matched anything #45
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
base: main
Are you sure you want to change the base?
Changes from all commits
760e0fd
8370bab
1030f8b
bdde2f0
5753a30
a703cf1
47c2621
6efcf1a
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,3 +1,4 @@ | ||
| K9! | ||
|
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. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
printf '%s\n' '--- target files ---'
for f in .machine_readable/self-validating/methodology-guard.k9.ncl container/deploy.k9.ncl; do
if [ -f "$f" ]; then
printf '%s\n' "### $f"
cat -n "$f" | sed -n '1,35p'
else
printf '%s\n' "MISSING: $f"
fi
done
printf '%s\n' '--- validator references ---'
fd -i 'validate-k9\.sh$|.*nickel.*' . | sed -n '1,80p'
rg -n -C 4 'validate-k9|nickel (typecheck|eval|parse)|K9!' .machine_readable container 2>/dev/null | sed -n '1,240p'Repository: hyperpolymath/panoply Length of output: 11166 🏁 Script executed: #!/bin/bash
set -u
for f in .machine_readable/self-validating/methodology-guard.k9.ncl container/deploy.k9.ncl; do
echo "### $f"
cat -n "$f" | sed -n '1,40p'
done
echo '### candidate validation scripts'
fd -t f -i 'validate-k9\.sh$|.*\.sh$' . | sed -n '1,160p'
echo '### relevant references'
rg -n -C 4 'validate-k9|nickel|K9!' . 2>/dev/null | sed -n '1,300p'Repository: hyperpolymath/panoply Length of output: 6030 🌐 Web query:
💡 Result: The K9! magic number and associated file header are not native to the standard Nickel configuration language itself [1][2][3], but rather belong to the K9 Self-Validating Components ecosystem [4][5], which uses Nickel as its underlying configuration and contract language [4][6]. K9! Magic Marker The string K9! (ASCII bytes 0x4B 0x39 0x21) serves as a mandatory file header or "magic number" at byte offset 0 for K9 self-validating components [7][6]. This marker identifies the file to tooling and is used for file-type detection (e.g., via the file(1) utility) [7]. Context K9 is a framework that uses Nickel files to define structured data, contracts, and executable recipes with cryptographic signatures [4][8][5]. The K9 ecosystem defines two primary file-level variants: 1. Kennel level (.k9): A YAML-like format for passive data that includes a pedigree block [4][6]. 2. Yard/Hunt level (.k9.ncl): A format using standard Nickel syntax for logic, contracts, and execution, also requiring the K9! magic header [4][6]. Standard Nickel The standard Nickel language (nickel-lang.org) does not require or define a K9! magic marker or any specific file header [1][9]. Nickel files typically use the.ncl extension [1][9]. While Unix-style scripts often use a shebang (#!), the Nickel interpreter does not strictly require a shebang, and the K9! marker functions as a proprietary file format signature rather than a traditional interpreter directive [7][6]. Citations:
🌐 Web query:
💡 Result: In the Nickel programming language, the exclamation mark (!) serves as the boolean NOT operator [1]. Regarding identifiers, Nickel follows a specific grammar: - An identifier must start with either an underscore () or an alphabetic character (a-z or A-Z) [1]. - Subsequent characters can include alphabetic characters, digits (0-9), underscores (), dashes (-), or single quotes (') [1]. - An identifier may contain zero or more leading underscores [1]. For example, the syntax _This-isn't_invalid is a valid Nickel identifier [1]. Boolean values are represented as true and false, and the boolean operators include && (AND), || (OR), and! (NOT), with the AND and OR operators exhibiting lazy evaluation [1]. Citations: Keep The file documents 📍 Affects 2 files
🤖 Prompt for AI Agents |
||
| # SPDX-License-Identifier: MPL-2.0 | ||
| # Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk> | ||
| # | ||
|
|
@@ -64,4 +65,22 @@ let methodology_guard = { | |
| }, | ||
| }, | ||
| } | ||
| in methodology_guard | ||
| in { | ||
| pedigree = { | ||
| schema_version = "1.0.0", | ||
| component_type = "methodology-validator", | ||
| security = { | ||
| leash = 'Yard, | ||
| trust_level = "validated-configuration", | ||
| allow_network = false, | ||
| allow_filesystem_write = false, | ||
| allow_subprocess = false, | ||
| }, | ||
| metadata = { | ||
| name = "methodology-guard", | ||
| version = "1.0.0", | ||
| description = "Validates declared repository methodology constraints", | ||
| }, | ||
| }, | ||
| guard = methodology_guard, | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
Include Nickel files in the scanner suffix set.
Path.suffixreturns.nclfor every*.k9.nclcontract. The condition at Line 178 therefore skips the K9 files that this workflow validates elsewhere. Add.ncltosource_suffixesso the invisible-character gate also covers K9 contracts.🤖 Prompt for AI Agents