Specification
Conformance suite
66 test packages for IDOP 1.0 (Annex B). A Reader or Producer may claim conformance when it opens every valid package and refuses every other one with exactly the listed code.
How to run it
- Fetch the index,
suite.json. Each case names a file in this directory and its expected outcome. - Open each file with your implementation.
validmeans the package MUST open; any other value is the error code (§16) of the refusal your implementation MUST report. - Cases are only ever added. A published case never changes its expected outcome.
With the reference command-line tool: idop validate --json <file> prints the outcome in the same form. The reference implementation passes every case; its build fails otherwise.
Files: MIT OR Apache-2.0. Error codes: registry.
Packages that MUST open (15)
| Case | What it covers |
|---|---|
valid-minimal.idop | The smallest package: mimetype, manifest, an entry point and one script. |
valid-state-and-resources.idop | Saved state under storage/, passive files under resources/, an icon. |
valid-network-capability.idop | A network capability bound to a credential that names no service. |
valid-nested-code.idop | Code split across folders, loaded by several scripts. |
valid-unicode-names.idop | UTF-8, NFC-normalised entry names with the UTF-8 flag. |
valid-extension-data.idop | Data of a namespaced extension under extensions/<namespace>/. |
valid-optional-feature-unknown.idop | An unknown optional feature is ignored. |
valid-webassembly.idop | A WebAssembly module under code/, loaded by the document with a relative fetch. |
valid-modules-and-worker.idop | ES modules importing each other by relative specifiers, and a dedicated worker. |
valid-binary-state.idop | Saved state that is not text: a binary file under storage/. |
valid-zip64-signature-in-content.idop | Entry data that happens to contain the ZIP64 signatures; ZIP64 is recognised by its structures, not by these bytes. |
valid-data-descriptor.idop | An entry written with general purpose bit 3 and a data descriptor that agrees with the central directory. |
valid-archive-comment.idop | An end of central directory record with a comment; nothing follows it. |
valid-words-in-comments-and-strings.idop | Forbidden names in comments, strings and JSON data are words, not uses (§8, rule 5). |
valid-svg-namespace.idop | Inline SVG whose xmlns attribute is a namespace name, not a remote URL (§8, rule 3). |
Packages that MUST be refused (51)
| Case | Expected code | What it covers |
|---|---|---|
zip-not-an-archive.idop | IDOP-ZIP-001 | Not a ZIP archive at all. |
zip-trailing-bytes.idop | IDOP-ZIP-011 | Bytes after the end of the archive (a polyglot). |
zip-leading-bytes.idop | IDOP-ZIP-018 | Bytes before the first entry (a self-extracting stub). |
zip-gap-between-entries.idop | IDOP-ZIP-023 | Bytes between two local records that the central directory does not account for. |
zip-hidden-local-entry.idop | IDOP-ZIP-023 | A complete local record between two entries that the central directory does not list: what a reader walking the local headers would see. |
zip-local-central-mismatch.idop | IDOP-ZIP-021 | A local header whose CRC-32 differs from its central directory record. |
zip-data-descriptor-mismatch.idop | IDOP-ZIP-024 | A data descriptor whose CRC-32 differs from the central directory. |
zip-encrypted-entry.idop | IDOP-ZIP-015 | An entry flagged as encrypted. |
zip-unsupported-method.idop | IDOP-ZIP-016 | An entry compressed with a method other than Store or Deflate (12, bzip2). |
zip-zip64-extra-field.idop | IDOP-ZIP-010 | An entry carrying a ZIP64 extended information extra field. |
zip-mimetype-extra-field.idop | IDOP-ZIP-019 | The mimetype local header carries an extra field, which moves the media type away from offset 38. |
profile-mimetype-not-first.idop | IDOP-PROFILE-001 | mimetype is present but is not the first entry. |
profile-mimetype-compressed.idop | IDOP-PROFILE-001 | mimetype is compressed instead of Stored. |
profile-wrong-media-type.idop | IDOP-PROFILE-002 | mimetype names another media type. |
profile-mimetype-line-terminator.idop | IDOP-PROFILE-002 | mimetype followed by a line terminator. |
path-traversal.idop | IDOP-PATH-006 | An entry name with a .. segment. |
path-backslash.idop | IDOP-PATH-002 | An entry name with a backslash. |
path-unknown-root.idop | IDOP-PATH-010 | An entry outside the defined roots. |
path-case-collision.idop | IDOP-PATH-030 | Two names that collide after case folding. |
path-case-fold-collision.idop | IDOP-PATH-030 | Two names equal under Unicode full case folding but not under lowercasing (straße, STRASSE). |
path-not-nfc.idop | IDOP-PATH-004 | An entry name in NFD instead of NFC. |
path-extension-namespace-uppercase.idop | IDOP-PATH-012 | An extension namespace that is not a lowercase reverse-domain identifier. |
path-windows-device.idop | IDOP-PATH-008 | A segment that is a Windows device name. |
path-directory-entry.idop | IDOP-ZIP-032 | A directory entry; packages contain files only. |
limit-compression-ratio.idop | IDOP-LIMIT-004 | One entry expands more than 100:1 (a decompression bomb). |
manifest-missing.idop | IDOP-PROFILE-003 | No idop.json. |
manifest-duplicate-key.idop | IDOP-MANIFEST-001 | idop.json repeats an object key. |
manifest-unknown-member.idop | IDOP-MANIFEST-003 | idop.json has a member the schema does not define. |
manifest-bad-application-id.idop | IDOP-MANIFEST-003 | application.id is not reverse-domain. |
manifest-credential-names-provider.idop | IDOP-MANIFEST-003 | A credential binding names a service. |
manifest-unused-credential.idop | IDOP-MANIFEST-026 | A credential binding no capability references. |
manifest-revision-lineage.idop | IDOP-MANIFEST-014 | parentRevisionId equals revisionId. |
manifest-timestamp-offset.idop | IDOP-MANIFEST-015 | A timestamp written with +00:00 instead of Z (§7.4). |
manifest-extension-key.idop | IDOP-MANIFEST-003 | A key of extensions that is not a reverse-domain namespace. |
manifest-origin-not-canonical.idop | IDOP-MANIFEST-003 | A capability origin with an uppercase host, which is not its ASCII serialization. |
manifest-origin-default-port.idop | IDOP-MANIFEST-023 | A capability origin that names the default port 443. |
manifest-duplicate-environment-id.idop | IDOP-MANIFEST-027 | Two environment bindings with the same identifier. |
unsupported-required-feature.idop | IDOP-UNSUPPORTED-002 | A required feature the Reader does not implement. |
unsupported-major-version.idop | IDOP-MANIFEST-003 | formatVersion of a major version the Reader does not implement. |
policy-active-resource.idop | IDOP-POLICY-001 | A script under resources/. |
policy-code-not-text.idop | IDOP-POLICY-002 | A non-code file type under code/. |
policy-inline-script.idop | IDOP-POLICY-014 | Inline script in HTML. |
policy-remote-url.idop | IDOP-POLICY-011 | HTML that loads a remote resource. |
policy-css-import.idop | IDOP-POLICY-012 | CSS with @import. |
policy-wasm-not-a-module.idop | IDOP-POLICY-004 | A .wasm file under code/ that is not a WebAssembly module. |
policy-wasm-outside-code.idop | IDOP-POLICY-001 | A WebAssembly module under resources/. |
policy-shared-worker.idop | IDOP-POLICY-010 | A shared worker, which would outlive the document. |
policy-service-worker.idop | IDOP-POLICY-010 | Registering a service worker, which would outlive the document. |
policy-javascript-url.idop | IDOP-POLICY-010 | A javascript: URL in HTML. |
policy-iframe.idop | IDOP-POLICY-011 | An iframe in HTML. |
policy-eval.idop | IDOP-POLICY-010 | Dynamic evaluation in document code. |