Skip to content
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

Detect E066 for fixture E066_E092_old_manifest_digest_incorrect #49

Closed
zimeon opened this issue Apr 19, 2021 · 2 comments · Fixed by #72
Closed

Detect E066 for fixture E066_E092_old_manifest_digest_incorrect #49

zimeon opened this issue Apr 19, 2021 · 2 comments · Fixed by #72
Labels
bug Something isn't working

Comments

@zimeon
Copy link
Owner

zimeon commented Apr 19, 2021

See OCFL/fixtures#71

@zimeon zimeon added the bug Something isn't working label Apr 19, 2021
@zimeon
Copy link
Owner Author

zimeon commented Apr 27, 2021

Currently the code does not detect the different in v1 state between the versions v1 and v2, just the E092:

(py38) simeon@RottenApple ocfl-py> ./ocfl-validate.py fixtures/1.0/bad-objects/E066_E092_old_manifest_digest_incorrect
[E092a] OCFL Object v1 inventory manifest using digest algorithm sha512 has digest 17e41ccb166d21a5327d5a2ae1bb48192b8470e1357266c9d119c294cb1e95978569472c9de64fb6d93cbd4dd0aed0bf1e7c47fd1920de17b038a08a85eb4fa1 for file v1/content/file-1.txt which doesn't match calculated digest 07e41ccb166d21a5327d5a2ae1bb48192b8470e1357266c9d119c294cb1e95978569472c9de64fb6d93cbd4dd0aed0bf1e7c47fd1920de17b038a08a85eb4fa1 for that file (see https://ocfl.io/1.0/spec/#E092)
INFO:ocfl.object:OCFL object at fixtures/1.0/bad-objects/E066_E092_old_manifest_digest_incorrect is INVALID

Where we have in v1/inventory.json:

    "v1": {
      "created": "2021-03-31T10:21:21.740101149-05:00",
      "state": {
        "17e41ccb166d21a5327d5a2ae1bb48192b8470e1357266c9d119c294cb1e95978569472c9de64fb6d93cbd4dd0aed0bf1e7c47fd1920de17b038a08a85eb4fa1": [
          "file-1.txt"
        ],
        "9fef2458ee1a9277925614272adfe60872f4c1bf02eecce7276166957d1ab30f65cf5c8065a294bf1b13e3c3589ba936a3b5db911572e30dfcb200ef71ad33d5": [
          "file-2.txt"
        ],
        "b3b26d26c9d8cfbb884b50e798f93ac6bef275a018547b1560af3e6d38f2723785731d3ca6338682fa7ac9acb506b3c594a125ce9d3d60cd14498304cc864cf2": [
          "file-3.txt"
        ]
      },

and in v2/inventory.json:

    "v1": {
      "created": "2021-03-31T10:21:21.740101149-05:00",
      "state": {
        "07e41ccb166d21a5327d5a2ae1bb48192b8470e1357266c9d119c294cb1e95978569472c9de64fb6d93cbd4dd0aed0bf1e7c47fd1920de17b038a08a85eb4fa1": [
          "file-1.txt"
        ],
        "9fef2458ee1a9277925614272adfe60872f4c1bf02eecce7276166957d1ab30f65cf5c8065a294bf1b13e3c3589ba936a3b5db911572e30dfcb200ef71ad33d5": [
          "file-2.txt"
        ],
        "b3b26d26c9d8cfbb884b50e798f93ac6bef275a018547b1560af3e6d38f2723785731d3ca6338682fa7ac9acb506b3c594a125ce9d3d60cd14498304cc864cf2": [
          "file-3.txt"
        ]
      },

N.B. different digest for file-1.txt!!

@zimeon
Copy link
Owner Author

zimeon commented Apr 27, 2021

Now more helpful error messages including E066:

(py38) simeon@RottenApple ocfl-py> ./ocfl-validate.py fixtures/1.0/bad-objects/E066_E092_old_manifest_digest_incorrect
[E066d] OCFL Object root inventory v1 version state has digest 07e41ccb166d21a5327d5a2ae1bb48192b8470e1357266c9d119c294cb1e95978569472c9de64fb6d93cbd4dd0aed0bf1e7c47fd1920de17b038a08a85eb4fa1 (mapping to logical files file-1.txt) that does not appear in the v1 inventory (see https://ocfl.io/1.0/spec/#E066)
[E066e] OCFL Object v1 inventory v1 version state has digest 17e41ccb166d21a5327d5a2ae1bb48192b8470e1357266c9d119c294cb1e95978569472c9de64fb6d93cbd4dd0aed0bf1e7c47fd1920de17b038a08a85eb4fa1 (mapping to logical files file-1.txt) that does not appear in the root inventory (see https://ocfl.io/1.0/spec/#E066)
[E092a] OCFL Object v1 inventory manifest using digest algorithm sha512 has digest 17e41ccb166d21a5327d5a2ae1bb48192b8470e1357266c9d119c294cb1e95978569472c9de64fb6d93cbd4dd0aed0bf1e7c47fd1920de17b038a08a85eb4fa1 for file v1/content/file-1.txt which doesn't match calculated digest 07e41ccb166d21a5327d5a2ae1bb48192b8470e1357266c9d119c294cb1e95978569472c9de64fb6d93cbd4dd0aed0bf1e7c47fd1920de17b038a08a85eb4fa1 for that file (see https://ocfl.io/1.0/spec/#E092)
INFO:ocfl.object:OCFL object at fixtures/1.0/bad-objects/E066_E092_old_manifest_digest_incorrect is INVALID

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant