Skip to content

Fidd format change / Metadata alignment#25

Merged
codekrolik2 merged 13 commits into
mainfrom
feature/metadata-alignment
May 27, 2026
Merged

Fidd format change / Metadata alignment#25
codekrolik2 merged 13 commits into
mainfrom
feature/metadata-alignment

Conversation

@codekrolik2

Copy link
Copy Markdown
Contributor

1st batch of updates

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR begins metadata alignment work by splitting logical file metadata headers into separate sections, updating packing/unpacking utilities for the new section model, and renamespacing FiddView HTTP URLs under /fidds/v1 on port 4199.

Changes:

  • Introduces FiddKey.SectionWithHeader and stores logical file body/header offsets and CRCs separately.
  • Reworks packer section ordering via SectionDescriptor/SectionArranger, including an option to align metadata sections.
  • Updates FiddView REST route prefixes, generated URLs, and related tests/imports.

Reviewed changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
.gitignore Ignores the FiddView SPA resources directory.
FiddCore/src/main/java/com/fidd/connectors/FastFiddConnector.java Narrows FastFiddConnector to chunk-based access and extends FiddConnector.
FiddCore/src/main/java/com/fidd/core/common/LogicalFileMetadataUtil.java Reads logical file metadata from the new header section offsets.
FiddCore/src/main/java/com/fidd/core/common/LogicalFileUtil.java Removes offset skipping from full logical file stream reads.
FiddCore/src/main/java/com/fidd/core/common/StreamUtils.java Adds shared stream skipping utility.
FiddCore/src/main/java/com/fidd/core/fiddkey/FiddKey.java Splits logical file sections into SectionWithHeader.
FiddCore/src/main/java/com/fidd/service/wrapper/WrapperFiddContentService.java Uses SectionWithHeader when loading logical file metadata.
FiddCore/src/test/java/com/fidd/core/common/LogicalFileMetadataUtilTest.java Updates metadata util tests for header offsets.
FiddCore/src/test/java/com/fidd/core/common/LogicalFileUtilTest.java Moves skip tests to StreamUtils.
FiddCore/src/test/java/com/fidd/core/fiddkey/yaml/YamlFiddKeySerializerTest.java Updates YAML serializer fixture to use SectionWithHeader.
FiddPacker/src/main/java/com/fidd/packer/forms/MainForm.java Passes the new metadata alignment option to packing.
FiddPacker/src/main/java/com/fidd/packer/pack/FiddPackManager.java Writes logical file bodies and metadata headers as separate sections.
FiddPacker/src/main/java/com/fidd/packer/pack/FiddUnpackManager.java Updates unpacking flow for SectionWithHeader and separated body/header layout.
FiddPacker/src/main/java/com/fidd/packer/pack/FilePathTuple.java Converts file path tuple to mutable state holder for section results.
FiddPacker/src/main/java/com/fidd/packer/pack/LengthAndCrcs.java Adds section offset to length/CRC write results.
FiddPacker/src/main/java/com/fidd/packer/pack/SectionArranger.java Adds section arrangement logic for metadata alignment.
FiddPacker/src/main/java/com/fidd/packer/pack/SectionDescriptor.java Adds descriptor classes for packer section planning.
FiddView/src/main/java/com/fidd/view/App.java Changes FiddView API port to 4199.
FiddView/src/main/java/com/fidd/view/forms/FiddViewForm.java Updates copied file and playlist URLs to /fidds/v1.
FiddView/src/main/java/com/fidd/view/rest/invoker/FiddHttpServerVerticle.java Updates custom download route and listener port.
FiddView/src/test/java/com/fidd/view/rest/mapper/LogicalFileInfoMapperTest.java Adjusts mapper tests after removing Section.headerLength.
Comments suppressed due to low confidence (1)

FiddCore/src/test/java/com/fidd/core/fiddkey/yaml/YamlFiddKeySerializerTest.java:37

  • This ImmutableSectionWithHeader builder does not set headerOffset, which is a required attribute on SectionWithHeader. The test will fail while building the fixture before serialization is exercised; add a valid header offset to the test data.
        List<FiddKey.SectionWithHeader> logicalFiles = List.of(ImmutableSectionWithHeader.builder()
                .sectionOffset(100)
                .sectionLength(1000)
                .encryptionAlgorithm("AES-256")
                .encryptionKeyData(new byte[] { 1,2,3,4,5 })
                .crcs(List.of(FiddSignature.of("Adler32", new byte[] { 6,7,8,9,10 })))
                .headerLength(765)
                .build()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread FiddPacker/src/main/java/com/fidd/packer/pack/FiddPackManager.java Outdated
Comment thread FiddCore/src/main/java/com/fidd/core/fiddkey/FiddKey.java Outdated
Comment thread FiddCore/src/main/java/com/fidd/core/common/LogicalFileUtil.java
Comment thread FiddPacker/src/main/java/com/fidd/packer/pack/SectionArranger.java Outdated
@codekrolik2 codekrolik2 changed the title Feature/metadata alignment Metadata alignment May 27, 2026
@codekrolik2 codekrolik2 changed the title Metadata alignment Fid format change / Metadata alignment May 27, 2026
@codekrolik2 codekrolik2 changed the title Fid format change / Metadata alignment Fidd format change / Metadata alignment May 27, 2026
@codekrolik2 codekrolik2 requested a review from Copilot May 27, 2026 20:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 30 out of 31 changed files in this pull request and generated 11 comments.

Comments suppressed due to low confidence (1)

FiddCore/src/test/java/com/fidd/core/fiddkey/yaml/YamlFiddKeySerializerTest.java:37

  • SectionWithHeader has a required primitive headerOffset() attribute, but this test fixture only sets headerLength. The Immutables builder will fail at runtime with a missing required attribute before the serializer round-trip can run; add a header offset to the fixture.
        List<FiddKey.SectionWithHeader> logicalFiles = List.of(ImmutableSectionWithHeader.builder()
                .sectionOffset(100)
                .sectionLength(1000)
                .encryptionAlgorithm("AES-256")
                .encryptionKeyData(new byte[] { 1,2,3,4,5 })
                .crcs(List.of(FiddSignature.of("Adler32", new byte[] { 6,7,8,9,10 })))
                .headerLength(765)
                .build()

Comment thread FiddPacker/src/main/java/com/fidd/packer/pack/FiddPackManager.java
Comment thread FiddPacker/src/main/java/com/fidd/packer/pack/SectionArranger.java Outdated
Comment thread FiddCore/src/main/java/com/fidd/core/fiddkey/FiddKey.java
Comment thread FiddCore/src/main/java/com/fidd/core/fiddkey/FiddKey.java

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 32 changed files in this pull request and generated 2 comments.

Comment thread FiddPacker/src/main/java/com/fidd/packer/pack/SectionArranger.java

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 31 out of 32 changed files in this pull request and generated 1 comment.

@codekrolik2 codekrolik2 merged commit cae1e33 into main May 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants