Skip to content

import: the pack's own untouched template produces a package asserting outcome="Accepted" #93

Description

@cloudronin

Importing packs/vv40/templates/vv40-template.xlsx unmodified produces a package whose decision outcome is Accepted. Nobody decided that — the template's own help text did, and the import exits 0.

Reproduce

cp packs/vv40/templates/vv40-template.xlsx /tmp/t.xlsx
uofa import /tmp/t.xlsx --pack vv40 -o /tmp/t.jsonld --base-uri https://a-domain-you-control/ns
python -c "import json;d=json.load(open('/tmp/t.jsonld'));print(d)" | grep -o 'Accepted'

Two of the sheets have to be cleared first for the import to get that far (see the second defect below); with that done, the run emits:

Warning: Sheet 'Decision', cell A3: 'Accepted / Not accepted / Conditional' is not a
canonical decision outcome — normalized to 'Accepted'. Canonical set: Accepted, Not
accepted, Conditional

and the resulting package carries outcome: 'Accepted'.

Why this one matters more than its severity suggests

The string being normalised is placeholder help text, and it normalises to the most consequential value in the vocabulary. A package that asserts an acceptance nobody made is the precise failure the assurance story exists to prevent, and it arrives through a warning on a zero exit — the path least likely to be read.

The same class shows up on Assessment Summary ('Minimal or Complete'Minimal; 'Low / Medium / High'Low). Those are less alarming but the same mechanism: hint text read as data, silently resolved to option one.

Suggested direction — normalising a value that came from a description row should be an error rather than a warning, or the description row should be skipped for these sheets the way it already is for Credibility Factors. protocol_check already knows these strings (it reads the pack template's description rows to build its placeholder set), so the knowledge exists; the importer just does not consult it.

Second, related defect: the template does not import as shipped

Model & Data and Validation Results put their headers on row 2 and their description text on row 3, which is where the importer expects data:

Error: Sheet 'Model & Data', cell A3: 'Requirement, Model, or Dataset' is not a valid
entity type. Expected: Requirement, Model, Dataset

Credibility Factors is laid out one row lower (headers 3, hints 4, data 5) and is unaffected. So uofa import <the pack's own template> fails out of the box, and the two-row-layout difference is undocumented — a consumer filling the template by hand hits it immediately.

Context

Found while wiring Credenza (a private consumer) to call the CLI through its public surface. Credenza clears the description rows before importing — which A-6 requires of an encoder anyway — so it is not blocked. Filing because the silent-normalisation path is dangerous for anyone who does not, and because the template-does-not-import defect is a first-run experience.

Found against v0.12.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions