Skip to content

Latest commit

 

History

History
3393 lines (2323 loc) · 128 KB

File metadata and controls

3393 lines (2323 loc) · 128 KB

Commit / Ticket Reference

  • Commit: feat(c2pa): flag screenshots and surface in analyze responses
  • Ticket: none (Feature #54)
  • Date: 2025-12-02
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5) via Codex CLI
  • Access Method: Local Codex CLI session (sandboxed; no paid API calls)
  • Configuration: Default model settings
  • Cost: $0 (course-provided access)

Purpose of AI Assistance

Added C2PA-driven screenshot detection and plumbing so screenshots are flagged as suspicious and exposed to clients. Work included heuristics based on claim generator and capture_type, new metadata fields, feature-vector update, score bump for screenshots, response DTO extensions, and regression tests.


Prompts / Interaction Summary

  • “Implement Feature #54: Expand Analyze to correctly identify screen shots”
  • “Plumb screenshot flag into analyze pipeline and response DTO”
  • “Add JSON parsing and service tests for screenshot detection”
  • “Fix Checkstyle line length in AnalyzeServiceTest”

Resulting Artifacts

  • src/main/java/dev/coms4156/project/metadetect/c2pa/C2paToolInvoker.java
  • src/main/java/dev/coms4156/project/metadetect/service/FeatureExtractor.java
  • src/main/java/dev/coms4156/project/metadetect/service/AnalyzeService.java
  • src/main/java/dev/coms4156/project/metadetect/dto/Dtos.java
  • src/main/resources/model.json
  • Tests: src/test/java/dev/coms4156/project/metadetect/c2pa/C2paToolInvokerJsonParsingTest.java, src/test/java/dev/coms4156/project/metadetect/service/AnalyzeServiceTest.java, src/test/java/dev/coms4156/project/metadetect/service/FeatureExtractorTest.java, src/test/java/dev/coms4156/project/metadetect/controller/AnalyzeControllerTest.java, src/test/java/dev/coms4156/project/metadetect/dto/DtosTest.java

Verification

  • ./mvnw -q test (passes; expected warnings from mocked c2patool branches)
  • ./mvnw -q -DskipTests compile to regenerate main classes after changes

Attribution Statement

Portions of this work were generated with assistance from OpenAI ChatGPT (GPT-5) on 2025-12-02. All AI-generated content was reviewed and finalized by the development team.


Commit / Ticket Reference

  • Commit: feat(logging): add request logging filter and console logback config
  • Ticket: none
  • Date: 2025-12-02
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5) via Codex CLI
  • Access Method: Local Codex CLI session (sandboxed; no paid API calls)
  • Configuration: Default model settings
  • Cost: $0 (course-provided access)

Purpose of AI Assistance

Implemented centralized HTTP request logging with SLF4J/Logback for Heroku: added a OncePerRequestFilter to log method/URI/status/duration, configured console-only Logback pattern, and documented usage in the README.


Prompts / Interaction Summary

  • “Here’s a ready-to-paste Codex prompt you can use for your new ‘logging’ branch 👇”
  • “can you make a commit message and fill out a citations template for it”

Resulting Artifacts

  • src/main/java/dev/coms4156/project/metadetect/logging/RequestLoggingFilter.java
  • src/main/resources/logback-spring.xml
  • README.md

Verification

  • Not run (sandboxed session without build execution). Recommended: ./mvnw -q test

Attribution Statement

Portions of this work were generated with assistance from OpenAI ChatGPT (GPT-5) on 2025-12-02. All AI-generated content was reviewed and finalized by the development team.


Commit / Ticket Reference

  • Commit: test: add coverage for model loader and logistic regression service
  • Ticket: none
  • Date: 2026-02-17
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5) via Codex CLI
  • Access Method: Local Codex CLI (sandboxed; no paid API calls)
  • Configuration: Default model settings
  • Cost: $0 (course-provided access)

Purpose of AI Assistance

Added unit tests to raise branch/instruction coverage for model loading and logistic regression inference, including cache validation, path resolution, invalid weight handling, C2PA flag behavior, and sigmoid branches.


Prompts / Interaction Summary

  • “give me a commit message and fill out a template in citations.md for the work we did”
  • “can you write test for these to increase branch and instruction coverage please”

Resulting Artifacts

  • src/test/java/dev/coms4156/project/metadetect/service/ModelLoaderTest.java
  • src/test/java/dev/coms4156/project/metadetect/service/LogisticRegressionServiceTest.java
  • src/test/resources/model/test-model.json

Verification

  • ./mvnw -q -Dtest=ModelLoaderTest,LogisticRegressionServiceTest test

Attribution Statement

Portions of this work were generated with assistance from OpenAI ChatGPT (GPT-5) on 2026-02-17. All AI-generated content was reviewed and finalized by the development team.


Commit / Ticket Reference

  • Commit: fix(storage): encode Supabase paths and normalize project base URL
  • Ticket: N/A (prod bugfix)
  • Date: 2025-11-29
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: Codex CLI (local, sandboxed; no paid API calls)
  • Configuration: Default model settings
  • Cost: $0 (course-provided access)

Purpose of AI Assistance

Identified and fixed Supabase storage path handling so filenames with spaces are safely encoded; normalized project base URLs to avoid double slashes in upload/sign/delete endpoints; ensured tests cover space-encoding paths.


Prompts / Interaction Summary

  • “Uploads fail when filenames contain spaces; make storage paths URL-safe for Supabase.”
  • “Fix double-encoding/double-slash issues in SupabaseStorageService.”
  • “Provide commit message and fill citations template.”

Resulting Artifacts

  • src/main/java/dev/coms4156/project/metadetect/service/SupabaseStorageService.java
  • src/test/java/dev/coms4156/project/metadetect/service/SupabaseStorageServiceTest.java

Verification

  • mvn -q -Dtest=SupabaseStorageServiceTest test

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on . All AI-generated content was reviewed, verified, and finalized by the development team. Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on 2025-11-29. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: pending (live E2E hardening and Pulse UX tweaks)
  • Ticket: none (stability/QA task)
  • Date: November 29, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5) via Codex CLI
  • Access Method: Local Codex CLI session (sandboxed; no paid API calls)
  • Configuration: Default model settings
  • Cost: $0 (course-provided access)

Purpose of AI Assistance

Hardened the live end-to-end test flow and client UX:

  • Adjusted the live E2E upload to use the real spaghetti.png, added multipart size overrides, and instrumented logging for 413s.
  • Refined Pulse auth flow to auto-redirect after signup when a token is returned.
  • Documented live E2E setup/behavior in README.

Prompts / Interaction Summary

  • “413 on live E2E upload—switch back to mock image and add logs.”
  • “Increase multipart limits for live profile.”
  • “Remove fallback to tiny payload once image upload succeeds.”
  • “Update Pulse so signup redirects like login when token is present.”
  • “Document how to run the live E2E in README.”

Resulting Artifacts

  • src/test/java/dev/coms4156/project/metadetect/e2e/ClientServiceLiveE2eTest.java (image upload, logging, no fallback)
  • src/test/resources/application-e2e-live.properties (multipart size limits)
  • src/main/resources/static/app.js (Pulse signup redirect when token saved)
  • README.md (live E2E instructions and payload description)

Verification

  • Live run: LIVE_E2E=true mvn -Dtest=dev.coms4156.project.metadetect.e2e.ClientServiceLiveE2eTest test (passes with spaghetti.png upload in current environment).
  • Manual browser check: signup now redirects to compose when Supabase returns a token.

Attribution Statement

Portions of this work were generated with assistance from OpenAI ChatGPT (GPT-5) on November 29, 2025. All AI-generated content was reviewed and validated by the development team.


Commit / Ticket Reference

  • Commit: test(API) wrote controller test after making changes for pooler connection (#49)
  • Ticket: #49 — Implement Demoable Client + Pooler Stability
  • Date: November 13, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5) via Codex CLI
  • Access Method: Local Codex CLI session (sandboxed, no paid API usage)
  • Configuration: Default model parameters supplied by course tooling
  • Cost: $0 (educational access)

Purpose of AI Assistance

Used AI to draft and refine the new controller-focused regression tests that restore JaCoCo coverage after the pooler/database changes. Guidance covered:

  • Designing slice tests for AnalyzeController (submit, status, manifest, compare)
  • Adding HealthControllerTest to drive both branches of the DB health ping and metadata endpoint
  • Restructuring SecurityConfigMvcTest to avoid datasource/autowire failures while still verifying CORS + JWT rules
  • Capturing the environment tweaks (application.properties, Mockito plugin) needed to boot the test slices without pooler credentials

Prompts / Interaction Summary

  • “write AnalyzeController MockMvc tests that assert JSON payloads and verify service calls”
  • “add HealthController tests without talking to a real DB”
  • “security config test fails because of datasource—convert to WebMvcTest and stub controllers”
  • “how do I stop Mockito inline from requiring the byte-buddy agent in the sandbox?”
  • “fill out the commit citation entry using the standard template”

Resulting Artifacts

  • Added controller tests:
    • src/test/java/dev/coms4156/project/metadetect/controller/AnalyzeControllerTest.java
    • src/test/java/dev/coms4156/project/metadetect/controller/HealthControllerTest.java
  • Hardened security slice testing:
    • src/test/java/dev/coms4156/project/metadetect/config/SecurityConfigMvcTest.java
    • src/test/java/dev/coms4156/project/metadetect/config/SecurityTestControllers.java
  • Test-only infrastructure:
    • src/test/resources/application.properties (stable Supabase defaults for tests)
    • src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
    • pom.xml dependency cleanup (removed mockito-inline)

Verification

  • Targeted suite:
    MAVEN_USER_HOME=$PWD/.m2 ./mvnw -q -Dtest=AuthControllerTest,ImageControllerTest,AnalyzeControllerTest,HealthControllerTest,SecurityConfigMvcTest test
  • All targeted tests pass. Full ./mvnw test still blocked in SupabaseStorageServiceTest / AuthProxyServiceTest because the course sandbox forbids binding local sockets for MockWebServer; rerun outside the sandbox to regenerate JaCoCo.

Attribution Statement

Portions of this commit were generated with assistance from OpenAI ChatGPT (GPT-5) on November 13, 2025. All AI-generated content was reviewed, tested, and validated by the development team before committing.


Commit / Ticket Reference

  • Commit: chore(init): renamed project to MetaDetect, updated package structure, pom.xml coordinates, and Spring Boot configuration (#2)
  • Ticket: #2 — INIT Project Skeleton Code
  • Date: October 15 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web Interface — free academic access via .edu email
  • Configuration: Default model settings (balanced reasoning, no custom temperature or paid APIs)
  • Cost: $0 (educational access only)

Purpose of AI Assistance

The AI assistant was used to help set up the initial iteration of the MetaDetect AI Image Detection Service project by providing technical guidance on:

  • Refactoring and renaming the base Spring Boot application from IndividualProjectMetaDetect
  • Updating Java package paths to dev.coms4156.project.metadetect
  • Revising the pom.xml to reflect new coordinates (groupId, artifactId, version, name) and to add Checkstyle, PMD, and JaCoCo (≥ 55 % coverage)
  • Adjusting application.properties to use spring.application.name=metadetect-service and spring.application.version=0.1.0
  • Cleaning Git tracking (.gitignore fixes and .idea untracking)
  • Crafting consistent commit messages and PR templates mapped to the Kanban workflow

Prompts / Interaction Summary

Prompts and questions provided to ChatGPT included:

  • “What should my Kanban ticket be called for setting up the skeleton code?”
  • “How should I rename my Spring Boot app and packages to MetaDetect?”
  • “Update my pom.xml to include PMD and JaCoCo 55 % coverage.”
  • “How do I remove tracked .idea files if they’re already in .gitignore?”
  • “Give me a proper commit message for the init branch (#2).”

Resulting Artifacts


Commit / Ticket Reference

  • Commit: bug(DB): fixes to help pooler connection limit (#49)
  • Ticket: #49 — Implement Demoable Client + Pooler Stability
  • Date: October 25, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

The AI assistant helped diagnose Supabase pooler exhaustion by reviewing how Spring transactions were scoped around long-running storage calls. Guidance focused on:

  • Shortening transaction lifetimes in ImageService so uploads/deletes don’t hold DB connections while streaming to Supabase Storage.
  • Adding orphan-cleanup logic so failed uploads best-effort delete the metadata row, preventing dangling rows that require manual cleanup.
  • Removing the broad @Transactional annotation from AnalyzeService.submitAnalysis so the expensive C2PA invocation runs outside the JDBC session.
  • Clarifying how to source env.pooler.sh so the smaller pool-size and timeout overrides are consistently applied during local runs.

Prompts / Interaction Summary

  • “Connections aren’t closing against the pooler—can you check ImageService for long transactions?”
  • “How can we make sure upload failures roll back the metadata row even after the storage call throws?”
  • “Should AnalyzeService keep the transaction open while running the C2PA CLI?”
  • “Remind me how to use env.pooler.sh so Hikari sees the 2-connection limit.”

Resulting Artifacts

  • src/main/java/dev/coms4156/project/metadetect/service/ImageService.java
    • Removed class-level @Transactional usage from controller entry points; now only the RLS helpers manage transactions.
    • Introduced deleteOrphanedImage() with logging to clean up rows when uploads fail midstream.
    • Wrapped upload flow in try/catch so DB rows are rolled back before rethrowing storage errors.
  • src/main/java/dev/coms4156/project/metadetect/service/AnalyzeService.java
    • submitAnalysis now persists the PENDING row and immediately releases the connection before downloading assets or running C2PA.
  • env.pooler.sh
    • Documented values reiterated so the pooler JDBC URL, credentials, and keepalive hints are sourced for local testing.

Verification

  • Ran mvn -DskipTests compile — build succeeded (only existing Guice sun.misc.Unsafe warnings remain).
  • Manual inspection confirmed all repository calls now occur within short-lived RLS-wrapped scopes, preventing Hikari from exceeding the 2-connection pooler cap.

Attribution Statement

Portions of the connection-scope refactor and pooler troubleshooting guidance for this commit were generated with assistance from OpenAI ChatGPT (GPT-5) on October 25, 2025. The development team reviewed, tested, and validated all AI-assisted changes prior to committing.

  • Updated project structure → dev/coms4156/project/metadetect
  • Updated MetaDetectApplication.java and application.properties
  • Rewritten pom.xml with MetaDetect metadata, PMD, Checkstyle, and JaCoCo rules
  • Cleaned .gitignore and removed .idea from Git index
  • Verified successful application startup (mvn spring-boot:run) on port 8080

Verification

  • Ran mvn clean verify → build success, no Checkstyle or PMD violations

  • Confirmed app startup log:

    Starting MetaDetectApplication v0.1.0 using Java 24.0.2

  • Verified all configuration files tracked under branch 2-init-project-skeleton-code


Attribution Statement

Portions of the project configuration, Maven setup, and documentation for this commit were generated with assistance from OpenAI ChatGPT (GPT-5) on October 15 2025. The AI was used to standardize naming conventions, refactor project metadata, and ensure compliance with Iteration 1 setup requirements. All AI-assisted content was reviewed, tested, and approved by the development team before commit and merge.


Commit / Ticket Reference

  • Commit: chore(init): finalize MetaDetect skeleton structure with controllers, services, and DTO layer setup (#2)
  • Ticket: #2 — INIT: Project Skeleton Code
  • Date: October 15, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

The AI was used to finalize the MetaDetect project skeleton setup. Specifically, assistance covered:

  • Refactoring and renaming the original “IndividualProject” codebase to “MetaDetect.”
  • Updating the pom.xml, application.properties, and MetaDetectApplication.java to align with the new naming.
  • Creating and organizing the initial Spring Boot project structure with controller, service, model, and dto packages.
  • Generating placeholder controller/service classes with TODO markers.
  • Creating a unified DTOs.java file containing request and response record definitions for API endpoints.
  • Advising on Git commit message format, Kanban naming conventions, and AI documentation best practices.

Prompts / Interaction Summary

  • “Can you give suggestions on renaming the project to match our group project name?”
  • “My application.properties still says IndividualProject—how should I change it?”
  • “Can you make controller, model, and service skeletons for our proposal?”
  • “What are DTOs and should I use one file or separate files?”
  • “Can you generate a commit message for final skeleton code setup?”
  • “Can you generate a citation with this template for everything since last commit?”

Resulting Artifacts

  • pom.xml — Updated artifact ID, name, and version for metadetect-service

  • application.properties — Renamed to spring.application.name=MetaDetect

  • MetaDetectApplication.java — Main entrypoint updated with new package path

  • Controller Files:

    • AnalyzeController.java
    • ImageController.java
    • AuthController.java
    • HealthController.java
  • Service Files:

    • AnalyzeService.java
    • ImageService.java
    • UserService.java
  • Model/DTO Files:

    • DTOs.java (centralized DTO record definitions)
  • .gitignore — Confirmed .idea/ exclusion

  • Kanban Mapping: confirmed linkage to ticket #2 INIT: Project Skeleton Code


Verification

  • Successfully ran the project using:

    mvn spring-boot:run

    confirming proper boot under metadetect-service.

  • Verified Maven build success via:

    mvn clean verify -DskipTests

    which returned BUILD SUCCESS.

  • Conducted manual review of project structure in IntelliJ IDEA to ensure correct package resolution, imports, and naming consistency.

  • No runtime or dependency errors observed; ready for future feature development.


Commit / Ticket Reference

  • Commit: chore(init): finalize MetaDetect controllers/services + single-file DTOs and fix imports (#2)
  • Ticket: #2 — Initialize Project Skeleton
  • Date: October 15, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

ChatGPT was used to:

  • Generate bare-bones skeleton code for controllers (AnalyzeController, AuthController, ImageController) and services (AnalyzeService, AuthService, ImageService) based on the MetaDetect project proposal.
  • Create a consolidated Dtos.java file defining all request/response records for analysis, image, and authentication endpoints.
  • Refactor import statements and fix Checkstyle indentation issues.
  • Resolve cannot find symbol compilation errors related to nested DTO usage and improve package structure consistency.
  • Suggest best-practice commit message conventions and project renaming alignment (from “IndividualProject” → “MetaDetect”).

Prompts / Interaction Summary

  • “Can you make a controller, model, service files for us to use and make them very bare with skeleton code and TODO’s based on our project proposal?”
  • “Should I put all DTOs in one file or separate files?”
  • “Fix Checkstyle indentation errors and capitalization warnings.”
  • “Maven compile failed — can you help fix missing symbol errors for DTOs?”
  • “Give me a commit message for final skeleton setup.”

Resulting Artifacts

  • src/main/java/dev/coms4156/project/metadetect/controller/AnalyzeController.java
  • src/main/java/dev/coms4156/project/metadetect/controller/AuthController.java
  • src/main/java/dev/coms4156/project/metadetect/controller/ImageController.java
  • src/main/java/dev/coms4156/project/metadetect/service/AnalyzeService.java
  • src/main/java/dev/coms4156/project/metadetect/service/AuthService.java
  • src/main/java/dev/coms4156/project/metadetect/service/ImageService.java
  • src/main/java/dev/coms4156/project/metadetect/dto/Dtos.java
  • Updated pom.xml and fixed application.properties naming consistency.

Verification

  • Verified compilation with:

    mvn -q -DskipTests compile

    Build successful (no compilation or Checkstyle errors).

  • Confirmed successful Spring Boot startup via mvn spring-boot:run (Tomcat initialized on port 8080).

  • Reviewed file structure and imports in IntelliJ to ensure no duplicate or unused imports remained.


Commit / Ticket Reference

  • Commit: feat(db): finalize Supabase integration and Flyway schema setup (closes #4)
  • Ticket: #4 — [DB] Integrate Supabase as the primary backend database
  • Date: October 15, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (Columbia University .edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

The AI assistant helped draft environment configuration steps, database integration instructions, Flyway migration structure, and JDBC repository templates to establish a working Supabase connection in the Spring Boot backend. It also assisted with writing Javadoc comments, resolving PMD and Checkstyle issues, and creating the final commit message and PR summary for Iteration 1.


Prompts / Interaction Summary

  • Guidance on connecting Spring Boot to Supabase via environment variables.
  • Creating the V1__init.sql Flyway migration and verifying database schema.
  • Writing Javadoc for BootSmoke.java, UserRepository.java, and ImageRepository.java.
  • Fixing PMD violations (EmptyCatchBlock, UselessParentheses).
  • Generating the final commit message for Iteration 1.
  • Clarifying how to produce PMD HTML reports via Maven configuration.

Resulting Artifacts

  • src/main/java/dev/coms4156/project/metadetect/BootSmoke.java
  • src/main/java/dev/coms4156/project/metadetect/repo/UserRepository.java
  • src/main/java/dev/coms4156/project/metadetect/repo/ImageRepository.java
  • src/main/resources/db/migration/V1__init.sql
  • Updated pom.xml (PMD plugin configuration)
  • Final commit message for Iteration 1

Verification

  • Verified successful build using mvn clean verify -DskipTests.
  • Confirmed Flyway migration ran and created schema tables in Supabase (users, images, analysis_reports, flyway_schema_history).
  • Validated /db/health endpoint returns “UP”.
  • Confirmed PMD and Checkstyle pass with 0 violations.
  • Manually inspected generated HTML PMD report.

Attribution Statement

Portions of this commit and configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 15, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: feat(db): replace users table with auth.users and add RLS (refs #10)
  • Ticket: #10 — Service: Implement UserService core logic (Iteration 1)
  • Date: February 27, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

The AI assisted in designing the revised database schema to align authentication with Supabase Auth, removing the local users table, and drafting RLS policies that enforce row-level ownership based on auth.uid().


Prompts / Interaction Summary

  • Requested guidance on replacing the local users table with Supabase Auth.
  • Asked for full V1__init.sql Flyway migration compatible with new architecture.
  • Asked for commit message formatting in conventional commit style.
  • Asked for linking commit to Kanban ticket.

Resulting Artifacts

  • db/migration/V1__init.sql (new baseline schema)
  • Removal of local users table
  • images.user_id → references auth.users(id)
  • analysis_reports updated to inherit cascading delete through images
  • RLS policy definitions for per-user isolation

Verification

  • Manual review of schema structure
  • Confirmed no existing data required migration
  • Verified Flyway migration builds successfully via mvn clean verify
  • Confirmed alignment with Supabase JWT-based identity model

Attribution Statement

Portions of this schema and RLS design were generated with assistance from OpenAI ChatGPT (GPT-5) on February 27, 2025. All AI-generated content was reviewed, validated, and finalized by the development team.


Commit / Ticket Reference


AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: Codex CLI (local workstation) connected to ChatGPT via academic access
  • Configuration: Default reasoning profile; no fine-tuning or paid API usage
  • Cost: $0 (covered by institutional access)

Purpose of AI Assistance

The assistant helped design and implement the in-repo demo client (“Pulse”) that exercises the MetaDetect auth and media APIs. This included:

  • Planning the folder layout under client/ and deciding on a framework-free static build (HTML/CSS/JS).
  • Creating the login/sign-up experience that proxies /auth/signup and /auth/login, persists Supabase access tokens, and redirects to the media composer.
  • Building “Pulse Studio,” a social-style posting page that uploads images, annotates captions and hashtags, lists prior uploads, previews signed URLs, and deletes posts.
  • Styling both pages to resemble a polished social app experience while remaining framework-agnostic for easy demoing.
  • Updating README.md with hosting instructions, routing behavior, and token-handling notes, plus tightening .gitignore for future client tooling.

Prompts / Interaction Summary

Representative instructions provided to the AI:

  • “Create a social-media inspired login/sign-up UI that hits our /auth APIs and show responses inline.”
  • “Build another page where creators can upload images, add captions/hashtags, and delete posts using /api/images.”
  • “Automatically store the Supabase access token in the browser and reuse it so users don’t have to paste it.”
  • “Hide the bearer token in the UI but still let me override it if needed.”
  • “Update the README with steps for serving the client and describe Pulse Studio.”
  • “Add a CTA on the login page that jumps to the composer, and auto-redirect to the composer after logging in.”

Resulting Artifacts

  • client/index.html, client/styles.css, client/app.js — Pulse login/sign-up client with Supabase token persistence and auto-redirect.
  • client/compose.html, client/compose.css, client/compose.js — Pulse Studio composer supporting uploads, captions/labels, feed rendering, signed URL previews, and inline deletes.
  • client/config.js — central base-URL configuration for targeting different backend instances.
  • .gitignore — ignores future client build outputs (client/node_modules, client/dist, .cache).
  • README.md — new “Client Demo (Pulse)” section covering login flow, Studio usage, and hidden-token behavior.

Verification

  • Manually exercised the login form against a local MetaDetect backend:
    • Verified successful /auth/login response, token persistence to localStorage, and automatic redirect to compose.html.
  • From Pulse Studio:
    • Uploaded sample images through /api/images/upload, confirmed captions/labels persisted via /api/images/{id} PUT.
    • Validated feed refresh hits /api/images and that signed URLs render in cards via /api/images/{id}/url.
    • Deleted posts with /api/images/{id} DELETE and confirmed feed updates.
  • README instructions were followed start-to-finish (serve with python3 -m http.server 4173 --directory client) to ensure documentation accuracy.

Attribution Statement

The Pulse demo client (login UI, Pulse Studio composer, token automation, and related documentation) was developed with assistance from OpenAI ChatGPT (GPT-5) on November 10, 2025. All generated assets were reviewed, manually tested in the browser, and incorporated into commit feat(Init): Demo UI Setup Initi (#49) by the project team.


Commit / Ticket Reference

  • Commit: feat(security): enable JWT resource server and implement identity resolution from Supabase tokens (refs #10)
  • Ticket: #10 — Service: Implement UserService core logic (Iteration 1)
  • Date: February 27, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Assisted with correctly configuring Spring Security as an OAuth2 Resource Server to validate Supabase JWTs, designing the identity resolution logic for extracting the authenticated user from the SecurityContext, and drafting correct Javadoc documentation required by Checkstyle.


Prompts / Interaction Summary

  • Asked how to correctly integrate Supabase Auth using Spring Security (Option A).
  • Requested support writing the initial UserService identity methods.
  • Asked how to configure application.properties with Supabase JWKS.
  • Requested Checkstyle-compliant fixes and class-level/method-level docs.
  • Asked whether to commit changes in pom.xml, and for a proper commit message.

Resulting Artifacts

  • pom.xml — added Spring Security + OAuth2 Resource Server dependencies
  • SecurityConfig.java — new JWT resource server configuration
  • UserService.java — implemented identity extraction from validated JWT
  • Updated Javadocs to pass Checkstyle
  • Updated application.properties to point to Supabase JWKS

Verification

  • mvn clean compile -DskipTests executed successfully
  • Checkstyle warnings resolved after adding missing class-level Javadocs
  • Verified that configuration compiles and is ready for Postman JWT testing

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on February 27, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: feat(test): add initial UserService unit tests and configure JaCoCo for project-only instrumentation (refs #10)
  • Ticket: #10 — Service: Implement UserService core logic (Iteration 1)
  • Date: February 27, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Assisted in drafting a unit test suite for the UserService to validate identity extraction from a Supabase JWT inside the Spring SecurityContext, and in refining JaCoCo configuration to limit instrumentation to application code only (avoiding JDK/Spring packages).


Prompts / Interaction Summary

  • Asked for a UserService test implementation without needing a Spring context.
  • Requested guidance on mocking authenticated vs unauthenticated identities.
  • Troubleshot JaCoCo instrumentation errors on JDK 24.
  • Requested proper feat(test) style commit message referencing the ticket.

Resulting Artifacts

  • pom.xml updated to adjust JaCoCo instrumentation scope.
  • src/test/java/dev/coms4156/project/metadetect/UserServiceTest.java created with 6 initial tests.

Verification

  • Ran mvn clean test successfully.
  • Confirmed all unit tests pass.
  • Confirmed Jacoco report generation succeeded and no longer attempts to instrument JDK classes.

Attribution Statement

Portions of this test suite and build configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on February 27, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: feat(c2pa): c2pa tool successfully downloaded (pom.xml updated) only functional on macOS(refs #14)
  • Ticket: #14 — Service: Implement AnalyzeService core logic (Iteration 1)
  • Date: October 21, 2025
  • Team Member: Isaac Schmidt

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Assistance was used to debug and configure Maven build behavior for the AnalyzeService Spring Boot service.
The AI helped ensure that the C2PAtool binary (used for AI-image authenticity verification) is correctly downloaded, unpacked, and persisted across build phases so it remains executable both locally and in deployment.


Prompts / Interaction Summary

  • Asked why mvn package wasn’t producing the tools/c2patool binary.
  • Requested possible solutions to pom.xml configuration using download-maven-plugin and maven-antrun-plugin.
  • Troubleshot successive build errors (e.g. "file is directory", missing binary).
  • Asked how to keep the binary after packaging and why Maven was deleting it.
  • Requested an explanation of the final working solution and how to preserve the executable between builds.

Resulting Artifacts

  • Edited File: pom.xml
    • Added download-maven-plugin section to fetch c2patool-v0.9.12-universal-apple-darwin.zip.
    • Added maven-antrun-plugin section to unzip, copy, chmod, and retain the binary.
  • New Directory: tools/ (containing executable c2patool)
  • Build Artifact: Verified Maven package with tools/c2patool present and executable.

Verification

  • Ran mvn clean package to confirm the binary appears at ./tools/c2patool.
  • Executed ./tools/c2patool --version to verify the file runs successfully.
  • Rebuilt the Spring Boot JAR to ensure the tools/ directory remains intact after packaging.
  • Manually inspected Maven logs and filesystem to confirm that no cleanup phase deletes the binary.

Commit / Ticket Reference

  • Commit: feat(c2pa): c2pa tool successfully downloaded (pom.xml updated) only functional on macOS(refs #14)
  • Ticket: #14 — Service: Implement AnalyzeService core logic (Iteration 1)
  • Date: October 21, 2025
  • Team Member: Isaac Schmidt

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Commit / Ticket Reference

  • Commit: feat(auth): add Supabase auth proxy + /auth endpoints + JWKS resource server config (refs #7)
  • Ticket: #7 — Implement Supabase-backed authentication
  • Date: October 21, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

The AI assisted in designing and scaffolding the Supabase authentication proxy integration. This included creating the AuthProxyService, generating a preconfigured WebClient for Supabase Auth endpoints, adding /auth controller routes, wiring JWT validation through Supabase’s JWKS, and ensuring all components passed Checkstyle and compilation checks. The AI also provided setup guidance for environment variables and secure configuration management.


Prompts / Interaction Summary

  • Repeat full proxy wiring code block for AuthController and SupabaseClientConfig
  • Add missing Javadoc comments for Checkstyle compliance
  • Resolve HttpStatus vs HttpStatusCode compilation mismatch
  • Provide environment variable export commands using set -a and .env.local
  • Validate correct JWKS configuration in Spring Boot (spring.security.oauth2.resourceserver.jwt.jwk-set-uri)
  • Generate AuthControllerTest for endpoint validation

Resulting Artifacts

  • New: SupabaseClientConfig.java
  • New: AuthProxyService.java
  • Modified: AuthController.java (added /auth/signup, /auth/login, /auth/refresh, /auth/me)
  • Modified: Dtos.java (added RefreshRequest record)
  • Modified: application.properties (added Supabase env-based config and JWKS endpoint)
  • Modified: pom.xml (added WebFlux dependency)
  • Moved: UserServiceTest.java (to service/ directory)

Verification

  • Verified build using mvn checkstyle:check (0 violations)
  • Successfully compiled with mvn -DskipTests compile after resolving HttpStatusCode changes
  • Confirmed application startup with valid Supabase URL and key configuration
  • Manual test planned for /auth/signup and /auth/me endpoints once live Supabase credentials are applied

Attribution Statement

Portions of this commit and configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 21, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: test(auth): add controller slice tests + security test config for Supabase proxy (refs #7)
  • Ticket: #7 — Integrate Supabase Auth Proxy + Resource Server
  • Date: October 21, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

The AI assisted in designing and drafting controller-slice tests for the /auth/* endpoints, as well as creating a dedicated Spring Security test configuration to allow unauthenticated access for the proxy tests. It also helped refine the JSON content-type enforcement in the proxy response so the controller tests aligned with expected client behavior.


Prompts / Interaction Summary

  • Requested a controller-level test suite for AuthController.
  • Noticed 403 and 401 blocking proxy tests → requested correction for security config.
  • Asked for SecurityTestConfig to disable CSRF and allow passthrough behavior.
  • AI provided corrections to enable application/json for returned ResponseEntity.

Resulting Artifacts

  • Updated logic in AuthController.java (exception handler → JSON passthrough)
  • Updated AuthProxyService.java (explicit JSON content type)
  • Added SecurityTestConfig.java for test slice security
  • Added AuthControllerTest.java, covering success and error paths

Verification

Changes were validated by:

  • Running mvn clean test to ensure all tests passed successfully
  • Confirming Spring Security configuration allowed test access to /auth/*
  • Inspecting JaCoCo coverage increase in controller and service layers
  • Manual code review for final consistency

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 21, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: test(auth): add AuthProxyService + config tests and branch coverage for /auth refresh (refs #7)
  • Ticket: #7 — Supabase Auth Integration
  • Date: October 21, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

The AI assisted in improving controller branch coverage and validating proxy/auth configuration behavior by generating focused unit tests and updating Dtos coverage.


Prompts / Interaction Summary

Key prompts included:

  • “need to increase branch coverage in controllers”
  • “tweak my test cases for both these changes”
  • “write javadoc comment”
  • “fix refresh 400 test”
  • “generate commit message and citations”

Resulting Artifacts

  • src/test/java/dev/coms4156/project/metadetect/service/AuthProxyServiceTest.java
  • src/test/java/dev/coms4156/project/metadetect/config/SupabaseClientConfigTest.java
  • src/test/java/dev/coms4156/project/metadetect/controller/AuthControllerTest.java (expanded branch coverage)
  • src/test/java/dev/coms4156/project/metadetect/dto/DtosTest.java
  • Javadoc correction for /auth/refresh
  • pom adjustments for test dependencies

Verification

Changes were validated via:

  • mvn clean test passing successfully
  • increased coverage reported in JaCoCo
  • manual review of error-path coverage in controller

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 21, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: chore(security): clean SecurityConfig imports and finalize JWKS config for prod (refs #7)
  • Ticket: #7 — Supabase Auth Integration
  • Date: October 21, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Guidance on finalizing Spring Security JWT resource server configuration for Supabase, correcting JWKS endpoint wiring, and addressing Checkstyle star-import violations in SecurityConfig.java.


Prompts / Interaction Summary

  • Asked how to allow unauthenticated signup/login while keeping /auth/me secured.
  • Verified JWKS vs. local symmetric-signature mode for development.
  • Asked for recommended commit message and proper citation entry wording.
  • Requested guidance on Checkstyle warnings and star-import cleanup.

Resulting Artifacts

  • Adjusted SecurityConfig.java (import cleanup and JWKS logic finalized).
  • Updated application.properties to cleanly reference spring.security.oauth2.resourceserver.jwt.jwk-set-uri.
  • Updated citations.md with this entry.

Verification

  • Local manual authentication test via curl using Supabase-issued token.
  • Confirmed access to POST /auth/signup and POST /auth/login without JWT.
  • Confirmed GET /auth/me returns 200 with valid JWT and 401 without.
  • Re-ran Checkstyle and confirmed zero violations.

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 21, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: feat(#9): add ImageRepository and implement ImageService with ownership and service-layer exceptions
  • Ticket: #9 — Implement ImageService core logic
  • Date: October 22, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

The AI provided guidance and implementation help for creating the ImageRepository, wiring it into the ImageService, and introducing service-layer exceptions (NotFoundException, ForbiddenException) to support ownership enforcement and clean error semantics.


Prompts / Interaction Summary

  • Asked how to start on the ImageService ticket.
  • Shared existing schema for the images table.
  • Requested matching repository + service implementation.
  • Asked whether service-layer exceptions are standard practice.
  • Requested a one-line commit message referencing ticket #9.

Resulting Artifacts

  • ImageRepository.java (new)
  • ImageService.java (updated core logic + ownership enforcement)
  • ForbiddenException.java (new)
  • NotFoundException.java (new)

Verification

  • Build completed successfully using mvn clean verify.
  • Code reviewed manually to confirm schema alignment and method signatures.
  • Successfully wired into the service layer with no startup issues.

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 22, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: test(#9): add ImageService unit tests and update pom to run under Java 17
  • Ticket: #9 — Implement ImageService core logic
  • Date: October 22, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Assistance was used to design and implement comprehensive branch-coverage unit tests for ImageService, including mocking strategies, repository interaction expectations, and handling JDK/Jacoco compatibility issues for coverage instrumentation.


Prompts / Interaction Summary

  • “Can we create unit test now on the code we just added…”
  • Debugging JaCoCo crash and version mismatch
  • Fixing Mockito inline instrumentation conflict
  • Request for one-line commit message referencing #9

Resulting Artifacts

  • src/test/java/dev/coms4156/project/metadetect/service/ImageServiceTest.java
  • Updated pom.xml (ensuring Java 17 execution for tests/coverage)

Verification

  • Successfully executed mvn clean test under Java 17
  • Verified branch coverage logic (success + failure paths)
  • Confirmed green test suite and valid JaCoCo run

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 22, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: api(#6): wire ImageController to ImageService and update metadata handling
  • Ticket: #6 — Implement ImageController endpoints
  • Date: October 22, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

The AI assisted in implementing the HTTP-facing controller layer by wiring ImageController to the existing ImageService, ensuring correct DTO mappings, handling ownership enforcement, and aligning update endpoints with the final DTO definitions. It also confirmed correct HTTP response shapes and status codes.


Prompts / Interaction Summary

  • “let’s implement the ticket”
  • “here is image controller”
  • “here is my user service”
  • “we can redo the dtos”
  • Compile errors surfaced → AI realigned controller logic with actual DTO structure

Resulting Artifacts

  • src/main/java/dev/coms4156/project/metadetect/controller/ImageController.java (updated)
  • Metadata update endpoint corrected to match UpdateImageRequest structure (note + labels only)
  • Exception → HTTP mapping added (404 / 403)

Verification

  • Successful Maven compilation after DTO alignment
  • Manual inspection of controller flow against schema and service logic
  • Local run verified routing and method resolution

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 22, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: api(#6): finalize ImageController + DTOs, add controller tests and move C2PA check to unit test
  • Ticket: #6 — Implement ImageController endpoints
  • Date: October 22, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Helped implement the controller logic integrating with the ImageService, updated DTO structures to match Supabase schema, and wrote comprehensive MockMvc-based unit tests to achieve branch and error-path coverage.


Prompts / Interaction Summary

  • “Redo this ticket because we are using Supabase”
  • “Let’s implement the ticket”
  • “Generate test cases”
  • “Fix test failures and remove integration test dependency on c2patool”
  • “One line commit description”

Resulting Artifacts

  • Updated: ImageController.java
  • Updated: Dtos.java
  • Added: ImageControllerTest.java (MockMvc tests)
  • Added: AnalyzeServiceTest.java (unit test replacement for former IT)
  • Removed: AnalyzeServiceIntegrationTests.java
  • Updated documentation: citations.md

Verification

  • Successfully built via mvn clean test
  • All controller endpoints verified with MockMvc tests
  • Branch/error-path coverage for forbidden and not-found scenarios
  • Ensured no external binary dependency required for CI

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 22, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: feat(#26): add SupabaseStorageService and wire upload/signed URL endpoints in ImageController
  • Ticket: #26 — Implement Binary Upload & Signed URL for Images
  • Date: October 22, 2025
  • Team Member: Jalen Stephens
  • Commit: test(c2pa): add unit tests for C2paToolInvoker to validate tool invocation and error handling
  • Ticket: #24 — Ensure c2patool Functionality Across All Systems and Build Unit Tests for C2paToolInvoker
  • Date: October 22, 2025
  • Team Member: Isaac Schmidt

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Helped scaffold the Supabase storage integration service, update the controller endpoints for generating signed upload URLs, and adjust DTO/logic flow to connect metadata persistence with binary upload behavior. The AI assisted in designing and implementing unit tests for the C2paToolInvoker class. These tests validate the correct invocation of the c2patool binary, handle various error scenarios, and ensure proper exception handling. The AI also provided guidance on creating temporary files for testing and structuring the test cases to cover success and failure paths.


Prompts / Interaction Summary

  • Asked how images should be stored in Supabase and how auth should interact with storage.
  • Prompted for best-practice bucket configuration (public vs. signed).
  • Requested initial service scaffolding and controller wiring.
  • Asked to adjust ImageController tests following storage logic changes.
  • Asked for a unit test suite for C2paToolInvoker to validate tool invocation.
  • Requested test cases for scenarios like:
    • Successful manifest extraction.
    • Non-existent image file.
    • Invalid file format.
    • Missing c2patool binary.
  • Asked for a commit message and citation entry for the tests.

Resulting Artifacts

  • Added SupabaseStorageService.java
  • Updated ImageController.java
  • Updated UserService.java to surface subject/owner context for uploads
  • Updated application.properties with storage config envs
  • Updated existing ImageControllerTest.java
  • File Created: src/test/java/dev/coms4156/project/metadetect/c2pa/C2paToolInvokerUnitTest.java
    • testExtractManifestSuccess: Validates successful manifest extraction from a mock image file.
    • testExtractManifestFileNotFound: Tests behavior when the image file does not exist.
    • testExtractManifestInvalidFile: Tests behavior when the file is not a valid image.
    • testExtractManifestToolNotFound: Tests behavior when the c2patool binary is missing.
    • Helper method createTempInvalidFile: Creates a temporary invalid file for testing.

Verification

  • Application compiled successfully (mvn clean test)
  • Manually reviewed controller logic and service wiring
  • Storage paths and bucket naming verified against Supabase UI setup
  • Ran mvn clean test to confirm all tests pass successfully.
  • Verified that temporary files are created and cleaned up correctly during tests.
  • Confirmed that the c2patool binary is invoked correctly for valid test cases.
  • Manually reviewed test output to ensure proper exception messages are logged for failure cases.

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 22, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: test(#26): add SupabaseStorageService and upload/signed-url controller unit tests
  • Ticket: #26 — [API] Implement Binary Upload & Signed URL for Images
  • Date: October 22, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Helped implement and structure the storage service test strategy and write unit tests for both the upload and signed URL controller logic. Also assisted in ensuring mocking behavior aligned with Supabase’s REST semantics.


Prompts / Interaction Summary

  • “can we write unit test for the files we made and change”
  • “we want Supabase mocked for upload/signed URLs”
  • “fix failing controller tests after adding upload”
  • “create standalone SupabaseStorageServiceTest”
  • “one line commit message for unit tests”

Resulting Artifacts

  • Added SupabaseStorageServiceTest.java
  • Updated ImageControllerTest.java with upload and signed URL cases
  • Validated integration between controller-service-storage layers via mocks

Verification

  • All tests executed locally via mvn clean test
  • Verified mocking behavior for success and error paths
  • Confirmed controller exception mapping still correct
  • Confirmed behaviors required by ticket #26 are exercised

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 22, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: feat(images): integrate Supabase JWT + RLS context + secure ImageService w/ ownership checks; update tests and mock image path refs(#26)
  • Ticket: #26 — Implement binary upload + signed URL for images
  • Date: October 22, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Integrated Supabase JWT validation into Spring Security, implemented row-level security context for database queries, and refactored ImageService to enforce ownership checks through the authenticated Supabase user.


Prompts / Interaction Summary

  • Asked for security configuration adjustments for custom /auth/login and /auth/signup endpoints.
  • Requested implementation of an RLS context helper for Postgres session variables.
  • Asked for modifications to ImageService to use the new RLS context + per-user ownership enforcement.
  • Clarified error messages and RLS setup behavior during integration testing.

Resulting Artifacts

  • SecurityConfig.java updated to use Supabase JWT secret validation
  • New RlsContext.java added
  • ImageService.java updated to apply ownership checks via RLS context
  • Test images renamed to lower-case extension for CI
  • AnalyzeServiceTest.java updated to align with new security context

Verification

  • Application builds successfully (mvn clean test)
  • Manual review of Spring Security bean instantiation with Supabase-provided JWT secret
  • Validated RLS path resolution through debugging and stack traces during live testing
  • Confirmed correct staged files in Git

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 22, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: feat(API): implement signed URL upload flow, align DTO/JSON mapping, and update tests for RLS (refs #26)
  • Ticket: #26 — Implement binary upload & signed URL flow for images
  • Date: October 22, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

AI assistance was used to debug failing tests caused by RLS enforcement, update DTO serialization to reflect new schema (removal of ownerUserId in favor of userId), ensure proper mapper alignment in the controller response, and update unit tests to correctly mock RlsContext.


Prompts / Interaction Summary

Key prompts included:

  • Fixing missing JSON property in ImageControllerTest
  • Updating tests rather than production code to reflect schema changes
  • Resolving NPEs by mocking RlsContext correctly
  • Eliminating UnnecessaryStubbing errors via lenient stubs
  • Cleaning assertions expecting DB-populated uploadedAt
  • Generating a one-line commit message referencing #26

Resulting Artifacts

The following files were modified or updated with AI assistance:

  • SecurityConfig.java
  • ImageController.java
  • RlsContext.java
  • Dtos.java
  • Image.java
  • ImageService.java
  • SupabaseStorageService.java
  • application.properties
  • ImageControllerTest.java
  • ImageServiceTest.java
  • SupabaseStorageServiceTest.java

Verification

Changes were validated via:

  • mvn clean test to ensure all tests pass
  • Manual inspection of JSON output format for DTO alignment
  • Ensuring test mocks correctly simulate RLS behavior
  • Verifying no UnnecessaryStubbing or NPEs remain

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 22, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: fix(api): make delete endpoint controller-thin and align storage delete with Supabase spec
  • Ticket: #26 — Implement binary upload & signed URL for images
  • Date: October 23, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Assisted in debugging Supabase object deletion behavior, identifying incorrect usage of /remove vs single-object DELETE, and restructuring the controller to delegate deletion entirely to the service layer in order to satisfy test expectations and avoid null dereferences.


Prompts / Interaction Summary

  • Asked why delete endpoint was returning 400 from Supabase
  • Asked how to properly call Supabase storage delete via REST
  • Debugged controller-side NPE during deleteImage tests
  • Requested thin-controller refactor + commit message

Resulting Artifacts

  • ImageController.java updated to delegate delete logic to imageService
  • SupabaseStorageService.java updated to align with Supabase delete semantics
  • ImageControllerTest.java updated and now passing for success / forbidden / notFound flows

Verification

  • All image deletion unit tests now pass
  • Manual reasoning check confirmed controller no longer dereferences null Image
  • Behavior matches Postman-tested Supabase semantics

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 23, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: feat(service): implement core AnalyzeService pipeline and persistence refs #8
  • Ticket: #8 — Implement AnalyzeService core logic (pipeline + persistence)
  • Date: October 23, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

AI was used to design and scaffold the new service-layer architecture for image analysis, including defining DTO contracts, repository/entity structure, and wiring the persistence + storage + C2PA pipeline according to the acceptance criteria. It assisted in identifying missing dependencies, shaping RLS-safe flows, and adapting the code to Spring Boot 3 / Jakarta conventions.


Prompts / Interaction Summary

  • Asked for analysis service design and persistence flow.
  • Requested DTO refinements to align with controller contracts.
  • Generated AnalysisReport entity and repository.
  • Updated AnalyzeService to implement PENDING → COMPLETED/FAILED lifecycle.
  • Fixed missing JPA imports and Clock bean wiring for successful application startup.
  • Added error handling (MissingStoragePathException) and JSON error persistence.

Resulting Artifacts

  • AnalyzeService (full pipeline logic)
  • AnalysisReport JPA entity
  • AnalysisReportRepository
  • DTO updates (AnalyzeStartResponse, AnalyzeManifestResponse, AnalyzeConfidenceResponse, etc.)
  • MissingStoragePathException
  • Supporting changes to pom.xml and application configuration

Verification

The implementation was validated through:

  • Successful project compilation after adding JPA + Clock bean
  • Service-layer unit test updates
  • Manual run ensuring Spring context loads with new beans and dependencies in place
  • Verified DTO compatibility with upcoming controller integration

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 23, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: chore(pmd): enable HTML reporting and add comprehensive AnalyzeService unit tests (refs #8)
  • Ticket: #8 — Implement AnalyzeService core logic
  • Date: October 23, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Assisted with configuring the JaCoCo and PMD reporting outputs, improving test coverage structure for AnalyzeService, and advising on best practices for service-level mocking and repository stubbing in unit tests.


Prompts / Interaction Summary

  • Requested help enabling HTML PMD reporting and linking it into the Maven lifecycle.
  • Asked for fixes to existing PMD violations and updated formatting.
  • Asked for new unit tests and integration test coverage for AnalyzeService.
  • Follow-up prompts clarified stubbing behavior and ownership enforcement flow.

Resulting Artifacts

  • Updated pom.xml with PMD HTML report configuration

  • New or updated test classes:

    • AnalyzeServiceTest
    • AnalyzeServiceC2paIntegrationTest
    • Minor fixes to C2paToolInvokerUnitTest
  • Cleanup of code paths that PMD flagged (unused imports, missing braces, etc.)


Verification

  • Ran mvn clean test to ensure all unit tests pass
  • Confirmed JaCoCo instrumentation runs and PMD passes verification
  • Manual review of generated /target/pmd.html output to validate HTML reporting

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 23, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: feat(API): implement full AnalyzeController endpoints and wire to AnalyzeService (refs #5)
  • Ticket: #5 — Implement AnalyzeController endpoints
  • Date: October 23, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

The AI was used to help design and implement the REST controller layer for the image analysis pipeline, ensuring correct delegation to AnalyzeService, aligning DTO usage, structuring endpoint semantics, and clarifying the expected Supabase interaction and ownership validation flow.


Prompts / Interaction Summary

  • Asked for a revised controller ticket that references Supabase-backed storage and the new service-layer pipeline.
  • Requested a full AnalyzeController.java implementation aligned with the existing AnalyzeService.
  • Discussed C2PA integration, error handling, and JSON output expectations.
  • Verified controller behavior for analysis start, metadata retrieval, confidence polling, and compare stub behavior.

Resulting Artifacts

  • AnalyzeController.java created/rewritten with full HTTP endpoint implementations
  • Wiring and validations integrated with AnalyzeService
  • Service changes to propagate errors correctly to the controller layer
  • Adjustments in C2paToolInvoker and Supabase logic to improve behavior consistency

Verification

  • Application boot & manual lifecycle testing via HTTP requests
  • Verified successful analysisId return flow and database persistence
  • Verified manifest return and Supabase storage fetch path correctness
  • Verified structured JSON error responses during C2PA failures

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 23, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: chore(api): refactor image controller + service (refs #32)

  • Ticket: #32 — [Test] - Write Unit Test for Image Controller

  • Date: October 23, 2025

  • Team Member: Jalen Stephens


AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Assisted with restructuring the ImageController and ImageService to follow proper Spring layering conventions, moving storage orchestration into the service layer, and adding missing Javadoc to satisfy static analysis (Checkstyle) requirements.


Prompts / Interaction Summary

  • Asked whether the controller/service layering was backwards.
  • Requested a revised controller implementation following recommended architecture.
  • Requested a matching updated service implementation.
  • Iterated on compilation issues (paging + DTO mismatch).
  • Added final pass for missing Javadoc to remove Checkstyle warnings.

Resulting Artifacts

  • ImageController.java (refactored: thinner controller, delegates orchestration to service)
  • ImageService.java (refactored: upload/delete/sign orchestrated in service)
  • Added Javadoc to all public service methods (Checkstyle clean)
  • Correct import for MethodArgumentTypeMismatchException

Verification

  • Project compiles successfully (mvn clean test)
  • Static checker (Checkstyle) produces no Javadoc warnings
  • Manual review of method boundaries confirms correct layering
  • Behavior remains unchanged at API level (no contract breakage)

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 23, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: test(image): expand service + controller unit tests to cover orchestration paths, signed-url flow, upload branches, and delete logic (refs #32)
  • Ticket: #32 — Write comprehensive unit tests for ImageService and ImageController
  • Date: October 23, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Assisted in designing and refining unit tests to achieve branch-level coverage for ImageService and ImageController, including refactoring test setups to correctly reflect orchestration boundaries introduced after service restructuring. Also helped identify and patch gaps in upload, signed-URL, and delete execution paths.


Prompts / Interaction Summary

  • Asked for branch coverage guidance on remaining uncovered sections of ImageService
  • Identified missing logic coverage in getSignedUrl, update, and deleteAndPurge
  • Requested corrected mocks for double-save orchestration in upload(...)
  • Integrated missing blank/null storage path tests
  • Adjusted controller tests to reflect new upload/signedUrl delegation

Resulting Artifacts

  • ImageServiceTest.java (expanded: coverage for null/blank/success branches + exception paths)
  • ImageControllerTest.java (aligned with new orchestration semantics)
  • ImageController.java (pagination fix default size to match test harness)
  • citations.md (commit metadata + attribution updated)

Verification

  • Local test suite passing (mvn clean test)
  • Coverage report verified via mvn jacoco:report with improved branch coverage
  • Manual review of save-upload-update orchestration validated against business logic
  • No remaining Mockito unnecessary stubbing errors

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 23, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: test(image,analysis): add missing branch coverage for upload, signed-url, truncate, and download paths (refs #32)
  • Ticket: #32 — Write comprehensive unit tests for ImageService, AnalyzeService, and ImageController
  • Date: October 23, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Helped identify untested execution branches across ImageService and AnalyzeService (upload orchestration, signed URL generation, private truncate and download methods) and guided the creation of targeted tests to ensure coverage of all success and error-state code paths.


Prompts / Interaction Summary

  • Asked how to achieve full branch coverage for service-layer logic
  • Requested missing paths for upload, URL signing, and truncation helpers
  • Added reflection-based invocation for private helper methods
  • Debugged cast + status mismatch failures in early iterations
  • Finalized test adjustments to reflect real method behavior

Resulting Artifacts

  • ImageServiceTest.java (expanded branch coverage: upload double-save, null/blank path handling, signed URL)
  • AnalyzeServiceTest.java (covered truncate variants, downloadToTemp success branch, runExtractionAndFinalize DONE branch)
  • ImageControllerTest.java (aligned with service orchestration)

Verification

  • Full test suite passing (mvn clean test)
  • Verified coverage improvement via mvn jacoco:report
  • Confirmed no Mockito stubbing errors or private-access violations remain

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 23, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: docs: add controller-level documentation for ImageController (refs #35)
  • Ticket: #35 — Add Javadoc and inline comments for controller layer
  • Date: February 23, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Assisted with drafting Javadoc comments, controller-level documentation, and inline explanatory comments for non-trivial logic within ImageController. Ensured documentation quality, structure, and consistency with Iteration 1 project standards.


Prompts / Interaction Summary

  • Asked AI to generate controller comments with <100 character line limit
  • Requested Javadoc coverage for all public endpoints
  • Added inline comments around ownership, UUID parsing, and update metadata behavior
  • Requested final one-line commit message referencing the related ticket

Resulting Artifacts

  • Updated ImageController.java with:

    • Controller-level class Javadoc
    • Method-level Javadoc
    • Inline comments for helper logic and DTO conversions
  • Commit message aligned with project style and ticket association


Verification

  • Performed manual review for clarity and accuracy
  • Confirmed no functional behavior changes
  • Built and ran application to ensure compilation unchanged

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on February 23, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: docs: annotate RlsContext, DTOs, and image/analysis models with comments (refs #35)
  • Ticket: #35 — Add Javadoc and inline comments for non-trivial codebase elements
  • Date: February 23, 2025
  • Team Member: Jalen Stephens

Commit / Ticket Reference

  • Commit: Update README.md to include full API documentation and build/run/test details
  • Ticket: #42 — chore: update readme.md to fit guidelines
  • Date: October 23, 2025
  • Team Member: Isaac Schmidt

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)
  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Assisted with expanding documentation coverage for non-controller layers, including entity models, DTOs, database/RLS context helpers, and repository interfaces. The goal was to make code self- documenting and ensure domain intent is clear to future maintainers. ChatGPT assisted with rewriting and expanding the project’s README.md to meet grading and documentation guidelines.
Specifically, it helped integrate:

  • Clear API endpoint documentation with input/output formats and status codes.
  • Formatted build/run/test instructions for Maven.
  • Verification that the README satisfies all rubric items (API docs, order dependencies, build/test instructions, third-party explanation).

Prompts / Interaction Summary

  • Asked AI to enhance documentation for model + database layers under 100 chars/line
  • Updated class-level Javadoc for AnalysisReport, Image, and DTO aggregates
  • Added explanations to RlsContext regarding Postgres GUC and RLS enforcement patterns
  • Documented explicit query semantics in repository interfaces
  • Requested a one-line commit message referencing ticket #35
  • “Create a copy and pastable README.md according to the format of the first file you received.”
  • “Does this file fulfill the rubric requirements for API documentation and setup instructions?”
  • “Write everything you assisted me with in .md format so that I can copy and paste it into my citations file.”

Resulting Artifacts

  • Updated the following files with improved documentation and inline comments:

    • RlsContext.java
    • Dtos.java
    • AnalysisReport.java
    • Image.java
    • AnalysisReportRepository.java
    • ImageRepository.java
  • README.md — new full-length Markdown file including:
    • Local setup & environment instructions (env.pooler.sh).
    • Comprehensive API documentation (auth, image, analyze endpoints, with status codes).
    • Testing and CI/CD sections (Maven, PMD, JaCoCo, Checkstyle).
    • Third-party tool acknowledgment (c2patool).
  • Added/updated “Metadetect Endpoints” section (paste-ready) including:
    • /auth/signup, /auth/login, /auth/refresh, /auth/me
    • /api/images (list, get by id, upload multipart, update, delete, signed URL)
    • /api/analyze (start, status, manifest, compare)
  • Clarified request headers, path/query params, success payloads, and error/status mappings consistent with service-layer behavior.
  • Validation of rubric compliance for README content (build, test, endpoints, ordering, third-party).

Verification

  • Manual inspection of generated comments for correctness and clarity
  • Confirmed compilation unchanged — documentation-only modifications
  • Verified repository method signatures and mappings remained intact
  • Manually reviewed the generated README for completeness and clarity.
  • Cross-checked against grading rubric for all 4 requirement categories.

Attribution Statement

Portions of this commit were generated with assistance from OpenAI ChatGPT (GPT-5) on February 23, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: docs: add Javadoc and inline comments across service layer and entrypoint (refs #35)
  • Ticket: #35 — Add Javadoc and inline comments for non-trivial codebase elements
  • Date: February 23, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Provided Javadoc and inline explanatory comments across the service layer and the Spring Boot entrypoint, improving readability, maintainability, and future onboarding clarity without modifying runtime behavior.


Prompts / Interaction Summary

  • Requested Javadoc for each service with <100 char line wrapping
  • Clarified ownership + RLS enforcement in ImageService
  • Documented lifecycle/pipeline semantics in AnalyzeService
  • Added usage/intent notes for SupabaseStorageService and AuthProxyService
  • Confirmed Jwt→identity semantics in UserService Javadoc
  • Added entrypoint-level project context to MetaDetectApplication
  • Requested one-line commit message referencing ticket #35

Resulting Artifacts

  • Updated documentation in the following files:

    • AnalyzeService.java
    • AuthProxyService.java
    • ImageService.java
    • SupabaseStorageService.java
    • UserService.java
    • MetaDetectApplication.java

Verification

  • Manual confirmation that Javadoc compiled and rendered correctly
  • No functional or behavioral code changes
  • Application builds and runs normally with all tests passing

Attribution Statement

Portions of this commit were generated with assistance from OpenAI ChatGPT (GPT-5) on February 23, 2025. All generated comments were reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: docs: surface CI evidence, coverage, partitions, and PMD before/after
  • Ticket: N/A (documentation/QA polish)
  • Date: February 23, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT via Codex CLI
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Documented CI evidence, coverage results, test equivalence partitions, static analysis before/after, integration/API/unit/E2E scope, and Kanban status in README.md. Updated reports/test-equivalence-partitions.md to reflect new tests (ModelLoader, UserService, AnalysisReport, health endpoints, Supabase WebClient). Added inline images for CI, coverage, PMD before/after.


Prompts / Interaction Summary

  • “can we actually make the images we reference appear in the readme”
  • “we added more test can you make sure that test-equivalence-partitions is up to date”
  • Integration/API/unit/E2E/coverage/PMD rubric clarifications (branch coverage, static analysis, style, API testing, integration testing, project management).

Resulting Artifacts

  • README.md — CI evidence images, coverage image (reports/MetaDetect80.png), PMD before/after images, clarified test scopes (unit/API/integration/E2E), CI triggers, coverage target, Kanban status, static analysis evidence.
  • reports/test-equivalence-partitions.md — updated partitions for ModelLoader, UserService, AnalysisReport entity, health endpoints, Supabase WebClient config.

Verification

  • Manual review of README rendering (image links) and content accuracy.
  • Confirmed partitions file lists current tests.

Attribution Statement

Portions of this documentation update were generated with assistance from OpenAI ChatGPT (GPT-5) on February 23, 2025. All AI-generated content was reviewed and verified by the development team.

Commit / Ticket Reference

  • Commit: docs: add Javadoc and inline comments across service layer and entrypoint (refs #35)
  • Ticket: #35 — Add Javadoc and inline comments for non-trivial codebase elements
  • Date: February 23, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Provided Javadoc and inline explanatory comments across the service layer and the Spring Boot entrypoint, improving readability, maintainability, and future onboarding clarity without modifying runtime behavior.


Prompts / Interaction Summary

  • Requested Javadoc for each service with <100 char line wrapping
  • Clarified ownership + RLS enforcement in ImageService
  • Documented lifecycle/pipeline semantics in AnalyzeService
  • Added usage/intent notes for SupabaseStorageService and AuthProxyService
  • Confirmed JWT→identity behavior and constraints in UserService
  • Added entrypoint-level context comment to MetaDetectApplication
  • Asked for and received a one-line commit message referencing ticket #35

Resulting Artifacts

Documentation added/improved in:

  • AnalyzeService.java
  • AuthProxyService.java
  • ImageService.java
  • SupabaseStorageService.java
  • UserService.java
  • MetaDetectApplication.java

Verification

  • Full manual review of Javadoc text
  • Ensured compilation unchanged (comments-only change)
  • Confirmed all existing tests pass

Attribution Statement

Portions of this commit were generated with assistance from OpenAI ChatGPT (GPT-5) on February 23, 2025. All generated comments were reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: test: add coverage docs and edge-case branches for auth/image tests (refs #35)
  • Ticket: #35 — Add Javadoc and inline comments for non-trivial codebase elements
  • Date: February 23, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Added commentary coverage notes and expanded edge-case test branches to improve line/branch coverage for controller endpoints. Ensured error states, missing fields, and invalid method/media combinations were represented to validate API surface behavior.


Prompts / Interaction Summary

  • Asked for additional test coverage for controller edge paths
  • Added missing negative branches for /auth/* routes
  • Restored and validated multipart/upload path coverage for /api/images
  • Confirmed JSON structure assertions and status codes for error handlers
  • Generated one-line commit message referencing ticket #35

Resulting Artifacts

Tests were expanded/refined in:

  • C2paToolInvokerUnitTest.java
  • SecurityTestConfig.java (test-only coverage)
  • SupabaseClientConfigTest.java
  • AuthControllerTest.java
  • ImageControllerTest.java

Verification

  • Full test suite runs successfully
  • CI-style coverage confirmed locally (no functional changes to code)
  • Manual inspection: assertions and JSON paths confirmed accurate

Attribution Statement

Portions of this commit were generated with assistance from OpenAI ChatGPT (GPT-5) on February 23, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: test: add javadoc and inline documentation for service layer tests refs(#35)
  • Ticket: #35 — write-javadoc-comments-for-all-non-trivial-code
  • Date: October 23, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

The AI assisted with drafting concise Javadoc blocks and inline comments in test classes to ensure clarity, maintainability, and compliance with project documentation standards. The AI also ensured line length and formatting requirements were followed.


Prompts / Interaction Summary

  • “create javadoc comments and comment …”
  • “don’t use p tags and keep lines under 100 chars”
  • “apply formatting to UserServiceTest”
  • “one line commit message”
  • “fill out commit citation template”

Resulting Artifacts

  • Updated UserServiceTest.java with Javadoc and inline comments
  • Standardized test documentation style for service layer tests
  • Commit message for tracking the change

Verification

  • Manual review of updated test file
  • Confirmed formatting and line-length rules met
  • Verified no behavioral/test logic changes introduced
  • Build and test suite continue to pass

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on October 23, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: test: add SecurityConfigMvcTest and AnalysisReportTest for branch coverage
  • Ticket: #35 — write javadoc comments for all non-trivial code
  • Date: October 23, 2025
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Add missing test coverage for security configuration and AnalysisReport entity, including branch-path testing, annotation validation, and lifecycle behavior verification.


Prompts / Interaction Summary

  • Asked for JUnit 5 test coverage for entity model (AnalysisReport)
  • Asked for Spring Security filter-chain + CORS + JWT branch coverage
  • Requested fixes for HS256 bit-length and null CORS request edge case
  • Requested javadoc & inline comments for non-trivial sections
  • Also asked for star-import removal and Checkstyle-safe cleanup

Resulting Artifacts

  • src/test/java/dev/coms4156/project/metadetect/config/SecurityConfigMvcTest.java
  • src/test/java/dev/coms4156/project/metadetect/model/AnalysisReportTest.java

Verification

  • Executed mvn -q -DskipITs test successfully with 0 failures
  • Verified security rules: public vs authenticated endpoints
  • Validated CORS configuration and issuer selection logic in JwtDecoder
  • Confirmed lifecycle behavior of @PrePersist and default enum values
  • Confirmed compliance with style rules (no star imports, annotations verified)

Attribution Statement

Portions of this commit were generated with assistance from OpenAI ChatGPT (GPT-5) on October 23, 2025. All AI-generated content was reviewed, verified, and finalized by the development team. Portions of this commit and documentation were generated with assistance from OpenAI ChatGPT (GPT-5) on October 23, 2025. All AI-generated content was reviewed, verified, and finalized by the development team before commit.


Commit / Ticket Reference

  • Commit: [doc] add swagger openapi documentation to backend (#16)
  • Ticket: #16
  • Date: November 13, 2025
  • Team Member: Isaac Schmidt

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

To generate complete OpenAPI/Swagger documentation for all backend controllers, including endpoint descriptions, parameter annotations, response schemas, and security requirements. Assistance also included creating a standardized OpenAPI configuration class and confirming that no /index endpoint was required for Swagger UI.


Prompts / Interaction Summary

  • Asked ChatGPT to create a Java SwaggerUI interface for the repository structure shown.
  • Requested full Swagger/OpenAPI documentation for each controller endpoint.
  • Asked whether a /index endpoint was necessary.
  • Requested a formatted citations entry suitable for inclusion in citations.md.

Resulting Artifacts

  • OpenApiConfig.java (new configuration file)
  • Updated Swagger/OpenAPI annotations added to:
    • HealthController.java
    • AnalyzeController.java
    • ImageController.java
    • AuthController.java
  • Documentation improvements across all endpoint methods (summary, description, parameters, responses, and security annotations).

Verification

  • Application rebuilt using mvn clean install to ensure no compilation issues.
  • Manually validated Swagger UI at:
    http://localhost:8080/swagger-ui/index.html
  • Confirmed that all controllers and endpoints appear with correct documentation.
  • Verified security requirements and parameter documentation render correctly.
  • Performed manual code review of generated annotations.

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on November 13, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: [doc] add swagger openapi documentation to backend (#16)
  • Ticket: #16
  • Date: November 13, 2025
  • Team Member: Isaac Schmidt

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

To generate complete OpenAPI/Swagger documentation for all backend controllers, including endpoint descriptions, parameter annotations, response schemas, and security requirements. Assistance also included creating a standardized OpenAPI configuration class and confirming that no /index endpoint was required for Swagger UI.


Prompts / Interaction Summary

  • Asked ChatGPT to create a Java SwaggerUI interface for the repository structure shown.
  • Requested full Swagger/OpenAPI documentation for each controller endpoint.
  • Asked whether a /index endpoint was necessary.
  • Requested a formatted citations entry suitable for inclusion in citations.md.

Resulting Artifacts

  • OpenApiConfig.java (new configuration file)
  • Updated Swagger/OpenAPI annotations added to:
    • HealthController.java
    • AnalyzeController.java
    • ImageController.java
    • AuthController.java
  • Documentation improvements across all endpoint methods (summary, description, parameters, responses, and security annotations).

Verification

  • Application rebuilt using mvn clean install to ensure no compilation issues.
  • Manually validated Swagger UI at:
    http://localhost:8080/swagger-ui/index.html
  • Confirmed that all controllers and endpoints appear with correct documentation.
  • Verified security requirements and parameter documentation render correctly.
  • Performed manual code review of generated annotations.

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on November 13, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: [doc] add swagger openapi documentation to backend (#16)
  • Ticket: #16 — Add Swagger/OpenAPI Documentation
  • Date: November 13, 2025
  • Team Member: Isaac Schmidt

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Used AI to generate, correct, and integrate full Swagger/OpenAPI documentation across the backend service. Assistance included:

  • Creating a complete OpenApiConfig class with security schemes and grouped API config
  • Adding @Operation, @ApiResponse, @SecurityRequirement, and @Tag annotations to all controller endpoints (AuthController, ImageController, AnalyzeController, HealthController)
  • Debugging 401 authentication issues blocking /v3/api-docs and Swagger UI
  • Refactoring SecurityConfig to ensure /api/** is secured while Swagger routes remain public
  • Fixing incorrect package paths and scan paths, resolving configuration conflicts
  • Walking through troubleshooting steps for Springdoc + Spring Security integration

Prompts / Interaction Summary

  • “Create the documentation for each endpoint in the controllers.”
  • “Fix Swagger UI — it says ‘Failed to load remote configuration’.”
  • “Is the repo structure causing the issue?”
  • “What security configuration will allow /v3/api-docs without auth?”
  • “Rewrite my citations entry in the required markdown format.”

Resulting Artifacts

  • Fully documented controllers:
    • AuthController.java
    • ImageController.java
    • AnalyzeController.java
    • HealthController.java
  • New or updated configuration files:
    • OpenApiConfig.java (correct package + packagesToScan)
    • SecurityConfig.java (path-scoped chain allowing Swagger endpoints)
  • Working Swagger UI at:
    • /swagger-ui/index.html
    • /v3/api-docs
    • /v3/api-docs/swagger-config
  • Cleanup of outdated configs to prevent 401s on OpenAPI endpoints

Verification

  • Rebuilt project using mvn clean spring-boot:run
  • Validated:
    • http://localhost:8080/v3/api-docs returns JSON (no auth required)
    • http://localhost:8080/v3/api-docs/swagger-config loads correctly
    • http://localhost:8080/swagger-ui/index.html renders full documentation
  • Manually inspected all controller documentation in Swagger UI
  • Confirmed that secured /api/** endpoints still require valid JWTs

Attribution Statement

Portions of this commit were generated with assistance from OpenAI ChatGPT (GPT-5) on November 13, 2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: [bug/doc] Fix C2PAToolInvoker Error and Repair Swagger UI (#39)
  • Ticket: #39 — Handle IO Exception Error in C2paToolInvoker
  • NOTE: Also repaired Swagger UI so that it behaves correctly
  • Date: November 19, 2025
  • Team Member: Isaac Schmidt

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Used AI to diagnose and patch key backend issues affecting C2PA tool invocation and Swagger UI functionality. Assistance included:

  • Identifying the root cause of a NullPointerException in C2paToolInvoker and recommending a safe error-handling path that returns a clean “no C2PA data” response instead of storing erroneous error codes.
  • Debugging and fixing Swagger UI authentication behavior, ensuring Bearer tokens are passed correctly and endpoints load via /v3/api-docs and /swagger-ui/index.html.
  • Correcting misapplied annotations in AuthController (@RequestBody mix-up between Spring and Swagger) that caused JSON request bodies to deserialize into null fields.
  • Verifying DTO definitions (RegisterRequest, LoginRequest, RefreshRequest) and advising explicit JSON property annotations where necessary.
  • Walking through troubleshooting steps for Spring Security, confirming Swagger’s Authorize flow, and validating that uploads (/api/images/upload) correctly receive JWTs.
  • Ensuring folder structure, config classes, and OpenAPI definitions (OpenApiConfig) were properly wired and not interfering with request handling.

Prompts / Interaction Summary

  • “Here’s the stack trace — why are email and password null during signup?”
  • “Why is Swagger UI not able to authorize file uploads?”
  • “Is my repository structure causing the Swagger issue?”
  • “Why does C2paToolInvoker throw a NullPointerException when the image has no manifest?”
  • “How do I fix @RequestBody so JSON actually binds to my DTO?”
  • “Write the assistance section in a copy-and-paste .md format.”

Resulting Artifacts

  • Updated and corrected backend components:
    • C2paToolInvoker.java logic for null-safe error handling.
    • AuthController.java corrected to use Spring’s @RequestBody.
    • AuthProxyService.java updated with proper null-safe escape logic and logging.
    • ImageController.java verified for proper Swagger + Bearer token behavior.
  • Configuration fixes:
    • OpenApiConfig.java corrected (@SecurityScheme, controller scan path).
    • Validation of existing SecurityConfig.java for Swagger compatibility.
  • Swagger UI restored to full functionality:
    • Correctly loads /v3/api-docs
    • Accepts JWT via Authorize
    • Allows image upload with bearer token
    • Renders all secured endpoints normally

Verification

  • Rebuilt project using:
    mvn clean spring-boot:run
  • Confirmed:
    • All /auth/* endpoints bind JSON correctly (no null DTO fields).
    • /auth/signup successfully proxies to Supabase without internal 500s.
    • C2PA analysis now returns a clean “no C2PA data” message when appropriate.
    • Swagger UI loads configuration without 401 or “Failed to load remote configuration”.
    • Bearer token added via Swagger’s Authorize correctly authenticates image uploads.
    • Manual and log-based verification performed for C2PA execution paths and auth flow.

Attribution Statement

Portions of this commit were generated with assistance from OpenAI ChatGPT (GPT-5) on November 19, 2025. All AI-generated recommendations and code were reviewed, tested, and validated by the development team prior to inclusion.

Commit / Ticket Reference

  • Commit: [feat] Prepare C2PAtool for integration into ML model (#55)
  • Ticket: #55 — [Feature] Modify C2PATool for Future ML Model Integration
  • NOTE: Also created integration tests for C2paToolInvoker replacing previous unit tests
  • Date: November 22, 2025
  • Team Member: Isaac Schmidt

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5.1 Thinking)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Used AI to design and implement a C2PA metadata extraction layer that is future-proof for ML integration and resilient to tool/manifest failures. Assistance included:

  • Defining a stable, ML-friendly output schema for C2PA metadata with primitive fields:
    • c2pa_hasManifest, c2pa_manifestCount, c2pa_claimGenerator, c2pa_claimGeneratorIsAI, c2pa_errorFlag, c2pa_errorMessage.
  • Refactoring C2paToolInvoker from a raw JSON-returning method to an API that always returns a fully-populated metadata object instead of throwing on common failure cases (e.g., “no claim found”).
  • Designing soft-failure semantics so missing manifests and CLI errors are represented as numeric flags instead of exceptions, making the pipeline safe for later logistic regression / feature-vector work.
  • Planning how this C2PA metadata will become the first feature block in a larger computer-vision + ML pipeline, with OpenCV-derived features to be appended later.

Prompts / Interaction Summary

  • “Can AI produce images with metadata indicating the image was taken on a camera?”
  • “Does C2patool work with HEIC images / does iPhone use C2PA data / does Instagram retain C2PA data?”
  • “How would I generate a test case for a 'present but invalid' manifest? Also which exit code can I expect from C2patool for this response?”
  • “Ensure that it fulfills this ticket description. It will be integrated into a Logarithmic regression model in the next iteration.”
  • “Modify C2paToolInvoker so every invocation returns ML-ready metadata instead of throwing on ‘no claim found’.”
  • “Generate an AI image that will fail C2patool via invalid manifest” → guidance on tampering a valid C2PA-signed image.
  • “Create the unit test” → requested JUnit 5 tests using the repo-local ./tools/c2patool/c2patool binary.
  • “This is the output I received once uploading an AI generated image with a valid manifest…” → diagnosing why c2pa_claimGenerator was null and how to read claim_generator_info.

Resulting Artifacts

  • New ML-ready C2PA metadata schema implemented in C2paToolInvoker:
    • Introduced C2paMetadata value type with fields:
      • int c2pa_hasManifest
      • int c2pa_manifestCount
      • String c2pa_claimGenerator
      • int c2pa_claimGeneratorIsAI
      • int c2pa_errorFlag
      • String c2pa_errorMessage
    • Added factory methods:
      • C2paMetadata.noManifest() for the soft “no claim found” case.
      • C2paMetadata.error(String message) for hard CLI/JSON failures.
  • Refactored C2PA invocation logic:
    • Replaced the old extractManifest(File) (throwing IOException on errors) with extractMetadata(File) that:
      • Invokes ./tools/c2patool/c2patool with -d for detailed JSON.
      • Interprets non-zero exit codes with "no claim found" as a soft success (no manifest, no error).
      • Converts all other CLI/IO/JSON issues into c2pa_errorFlag = 1 and a populated c2pa_errorMessage.
      • Logs raw JSON from c2patool at debug level for local debugging without exposing it to the ML layer.
  • JSON parsing and claim generator extraction:
    • Implemented a JSON parser that:
      • Counts manifests via the top-level manifests object to populate c2pa_manifestCount.
      • Uses active_manifest to identify the primary manifest, with a fallback to the first manifest.
      • Extracts the generator from the modern field:
        • claim.claim_generator_info.name
      • Falls back to legacy claim.claim_generator if present.
      • Applies a configurable keyword list to set c2pa_claimGeneratorIsAI (e.g., matches “ChatGPT”, “DALL·E”, “midjourney”, “stable diffusion”, “gpt”, etc. via lowercase substring matching).
  • Integration with analysis pipeline (AnalyzeService):
    • Updated runExtractionAndFinalize to:
      • Call c2paToolInvoker.extractMetadata(tempFile) instead of returning raw manifest JSON.
      • Serialize C2paMetadata to JSON via ObjectMapper and store it in AnalysisReport.details.
      • Treat C2PA-related issues as:
        • DONE with soft “no manifest” metadata when appropriate.
        • FAILED only for IO-level or unexpected exceptions (e.g., download errors), reusing the existing handleGenericFailure path.
  • Test scaffolding and integration tests:
    • Designed JUnit 5 tests (C2paToolInvokerIntegrationTest) that:
      • Use repo-local c2patool at ./tools/c2patool/c2patool (no system install required).
      • Expect test images under src/test/resources/c2pa/:
        • valid_ai.png — AI-generated image with a valid C2PA manifest.
        • no_manifest.jpg — ordinary image with no C2PA provenance.
      • Generate a tampered image in a temporary directory by flipping a byte in the file to simulate “manifest present but invalid”.
    • Each test asserts that:
      • Valid AI image → c2pa_hasManifest = 1, c2pa_manifestCount >= 1, c2pa_errorFlag = 0, non-null c2pa_claimGenerator, and c2pa_claimGeneratorIsAI = 1.
      • Tampered AI image → still reports c2pa_hasManifest = 1 and a consistent schema; reserved for future “manifestValid” flag extension.
      • No-manifest image → c2pa_hasManifest = 0, c2pa_manifestCount = 0, c2pa_errorFlag = 0, and c2pa_errorMessage = null.

Verification

  • Local functional verification:
    • Ran the updated analysis pipeline with:
      • AI-generated image containing a valid C2PA manifest → observed JSON like:
        {
          "c2pa_hasManifest": 1,
          "c2pa_manifestCount": 2,
          "c2pa_claimGenerator": "ChatGPT",
          "c2pa_claimGeneratorIsAI": 1,
          "c2pa_errorFlag": 0,
          "c2pa_errorMessage": null
        }
      • Same image after byte-level tampering → manifest still detected as present, schema stable, reserved for future “manifest validity” feature.
      • A plain image with no C2PA data → confirmed it returns:
        {
          "c2pa_hasManifest": 0,
          "c2pa_manifestCount": 0,
          "c2pa_claimGenerator": null,
          "c2pa_claimGeneratorIsAI": 0,
          "c2pa_errorFlag": 0,
          "c2pa_errorMessage": null
        }
    • Verified that no exceptions are thrown to the caller for C2PA-specific issues; all errors are converted into numeric flags.
  • Build and test flow:
    • Maven build and tests:
      mvn clean test
    • Confirmed:
      • C2paToolInvoker runs successfully using ./tools/c2patool/c2patool.
      • AnalyzeService stores the new C2PA metadata schema in AnalysisReport.details.
      • “No manifest” and other C2PA edge cases no longer cause FAILED reports unless there is a true IO or unexpected runtime error.
  • Manual inspection / logging:
    • Reviewed debug logs containing raw c2patool JSON output to confirm:
      • manifests and active_manifest are parsed correctly.
      • claim_generator_info.name is correctly mapped to c2pa_claimGenerator.
      • AI keyword matching behaves as expected (e.g., “ChatGPT” → c2pa_claimGeneratorIsAI = 1).

Attribution Statement

Portions of this commit were generated and refined with assistance from OpenAI ChatGPT (GPT-5.1 Thinking) on November 22, 2025. All AI-generated code, tests, and design recommendations were reviewed, adapted, and validated by the developer (Isaac Schmidt) before being committed to the repository.


Commit / Ticket Reference

  • Commit: [feat] Create OpenCV Feature Functions to be Implemented Into ML Model (#64)
  • Ticket: #64
  • Date: November 23 2025
  • Team Member: Isaac Schmidt

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

AI assistance was used to design, debug, and generate the complete FeatureExtractor.java implementation for computing computer-vision-based image features used in the future machine-learning classifier. This included determining which OpenCV features best support AI-image detection, resolving dependency conflicts, selecting the correct OpenCV distribution for Java, and producing a working, stable feature-extraction pipeline fully compatible with the existing C2PA metadata system.


Prompts / Interaction Summary

  • Asked what Java packages could be used to detect AI-generated images.
  • Requested recommended OpenCV-based feature operations for ML classification.
  • Asked which simple ML models (logistic regression, random forest, etc.) best pair with feature vectors.
  • Requested generation of a complete feature extractor class.
  • Encountered repeated issues with Bytedeco JavaCPP OpenCV; requested debugging.
  • Asked whether switching to pure OpenCV Java API was better (it was).
  • Requested generation of a fully working pure OpenCV FeatureExtractor.java integrated with C2PA metadata.

Resulting Artifacts

  • FeatureExtractor.java — full pure-OpenCV implementation including:
    • Laplacian variance (sharpness)
    • Noise estimation
    • Edge density
    • High/low frequency ratio (DFT)
    • Saturation entropy (HSV histogram)
    • Image geometry features (width, height, aspect ratio)
    • Integration of C2PA metadata fields
  • OpenCV dependency instructions for Maven.
  • Native library loading instructions.
  • Guidance for replacing Bytedeco with the official OpenCV Java API.
  • Corrected, stable version of the feature-extraction pipeline.

Verification

  • Verified that all OpenCV functions (meanStdDev, Laplacian, calcHist, normalize, magnitude, etc.) exist in the official OpenCV Java API.
  • Confirmed successful compilation using the OpenPnP OpenCV Maven package.
  • Manual validation by test-loading several images, confirming that:
    • Features return numeric values
    • Histogram entropy behaves as expected
    • Laplacian and noise functions vary predictably across images
    • C2PA metadata is correctly appended in the feature vector

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on November 23 2025. All AI-generated content was reviewed, validated, and finalized by the development team.


Commit / Ticket Reference

  • Commit: pending
  • Ticket: none
  • Date: 2026-02-17
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5)
  • Access Method: Codex CLI (local, sandboxed)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Updated the CI pipeline to run Maven tests from the module root, generate JaCoCo + PMD HTML reports, convert them to PNG snapshots, and bundle HTML/PNG/XML outputs into a single artifact.


Prompts / Interaction Summary

  • “It doesn’t correctly run unit tests from the module root; collect JaCoCo + PMD HTML and PNG artifacts.”
  • “Convert HTML → PNG via wkhtmltoimage and package reports.”
  • “Give a commit message and fill out the citations template for these changes.”

Resulting Artifacts

  • .github/workflows/ci-reports.yml (CI steps for tests, reports, PNG conversion, artifact upload, PMD gate)
  • scripts/html_to_png.sh (HTML-to-PNG conversion plus HTML copies into reports/html)

Verification

Not run locally here (follow-up: ./mvnw -B -ntp clean test && ./mvnw -B -ntp jacoco:report && ./mvnw -B -ntp pmd:pmd -Dpmd.failOnViolation=false && bash scripts/html_to_png.sh && ./mvnw -B -ntp pmd:check).


Attribution Statement

Portions of this work were generated with assistance from OpenAI ChatGPT (GPT-5) on 2026-02-17. All AI-generated content was reviewed and finalized by the development team.

Commit / Ticket Reference

  • Commit: pending
  • Ticket: none
  • Date: 2026-02-17
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5) via Codex CLI
  • Access Method: Local Codex CLI (sandboxed)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Extended CI and test reliability:

  • Refined ci-reports.yml to run Maven tests from module root, generate JaCoCo/PMD HTML, convert to PNG, and bundle reports into a single artifact.
  • Updated scripts/html_to_png.sh to collect HTML assets and PNG snapshots under reports/.
  • Made C2PA integration tests portable with JSON fixtures when the macOS c2patool binary is unavailable; exposed a parsing helper.
  • Fixed Checkstyle issues (import order, indentation, wrapping) across FeatureExtractor, C2PA unit/integration tests, ImageControllerTest, SupabaseStorageServiceTest, AnalyzeServiceTest, AuthProxyServiceTest.

Prompts / Interaction Summary

  • “It doesn’t correctly run unit tests from the module root; collect JaCoCo + PMD HTML and PNG artifacts.”
  • “Convert HTML → PNG via wkhtmltoimage and package reports.”
  • “Make the C2PA integration tests work on all systems.”
  • “Fix the Checkstyle warnings (import order, operator wrap, indentation).”
  • “Commit message and fill out the citations template.”

Resulting Artifacts

  • .github/workflows/ci-reports.yml
  • scripts/html_to_png.sh
  • src/main/java/dev/coms4156/project/metadetect/service/FeatureExtractor.java
  • src/test/java/dev/coms4156/project/metadetect/c2pa/C2paToolInvokerIntegrationTest.java
  • src/test/java/dev/coms4156/project/metadetect/c2pa/C2paToolInvokerUnitTest.java
  • src/test/java/dev/coms4156/project/metadetect/controller/ImageControllerTest.java
  • src/test/java/dev/coms4156/project/metadetect/service/SupabaseStorageServiceTest.java
  • src/test/java/dev/coms4156/project/metadetect/service/AnalyzeServiceTest.java
  • src/test/java/dev/coms4156/project/metadetect/service/AuthProxyServiceTest.java
  • src/test/resources/c2pa-fixtures/*.json

Verification

  • Local: ./mvnw -q -DskipTests compile (passes in sandbox).
  • Follow-up recommended: ./mvnw -B -ntp clean test jacoco:report pmd:pmd -Dpmd.failOnViolation=false and ./mvnw -B -ntp pmd:check to enforce gates.

Attribution Statement

Portions of this work were generated with assistance from OpenAI ChatGPT (GPT-5) on 2026-02-17. All AI-generated content was reviewed and finalized by the development team.


Commit / Ticket Reference

  • Commit: pending
  • Ticket: none
  • Date: 2026-02-17
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5) via Codex CLI
  • Access Method: Local Codex CLI (sandboxed)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

Expanded CI coverage and optional live E2E hook:

  • Added Checkstyle execution to the CI workflow and bundled the XML into artifacts.
  • Added an opt-in live E2E test step (LIVE_E2E=true ./mvnw -Dtest=dev.coms4156.project.metadetect.e2e.ClientServiceLiveE2eTest test) gated by RUN_LIVE_E2E.
  • Retained prior report generation and artifact packaging.

Prompts / Interaction Summary

  • “Does this do all of this: Continuous Integration… add Checkstyle to the CI”
  • “We also have an E2E test … command: LIVE_E2E=true mvn -Dtest=dev.coms4156.project.metadetect.e2e.ClientServiceLiveE2eTest test”
  • “git commit and add citations”

Resulting Artifacts

  • .github/workflows/ci-reports.yml
  • citations.md

Verification

  • Local: ./mvnw -q -DskipTests compile
  • CI: run ci-reports workflow; Checkstyle now executes, E2E step runs when RUN_LIVE_E2E=true.

Attribution Statement

Portions of this work were generated with assistance from OpenAI ChatGPT (GPT-5) on 2026-02-17. All AI-generated content was reviewed and finalized by the development team.


Commit / Ticket Reference

  • Commit: [feat] Implemented and Trained Logistic Regression Model
  • Ticket: (#66) Implementation of Logistic Regression ML Model for Confidence Score
  • Date: 12/1/2025
  • Team Member: Isaac Schmidt

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5.1)
  • Access Method: ChatGPT Web (.edu academic access)
  • Configuration: Default model settings
  • Cost: $0 (no paid API calls)

Purpose of AI Assistance

AI assistance was used to design, structure, and validate the machine-learning component of the MetaDetect system. This included help with:

  • Creating a feature extraction–based ML pipeline for AI-image detection
  • Designing the workflow for offline model training (without including Python code in the repository)
  • Advising on the correct model type, dataset preparation, cross-validation strategy, and model export
  • Generating the Java inference architecture (ModelLoader, LogisticRegressionModel, AnalyzeService integration)
  • Debugging dataset preparation issues and ensuring compatibility between training-time features and runtime inference

Prompts / Interaction Summary

Key interactions included:

  • Requesting recommendations for ML models appropriate for OpenCV feature vectors
  • Asking how to train a logistic regression model offline and export weights for Java inference
  • Debugging DatasetBuilder and CSV formatting issues to generate valid ML training data
  • Setting up cross-validation for model evaluation
  • Requesting a final AnalyzeService integration that correctly combines C2PA overrides with ML fallback
  • Asking how and where model.json should be loaded in the service layer
  • Requesting fixes and refactoring for ModelLoader, LogisticRegressionService, and FeatureExtractor interactions
  • Clarifying model runtime behavior, including how C2PA features interact with ML predictions

Resulting Artifacts

The following deliverables were created or refined with AI assistance:

  • DatasetBuilder.java — Generates ML-ready feature CSVs from raw images and metadata
  • train_model.py (offline use only) — Script used externally to train the logistic regression model
  • export_model.py (offline use only) — Exports trained LR weights to a Java-readable model.json
  • model.json — Serialized logistic regression weights and bias used in production
  • LogisticRegressionModel.java — Runtime inference implementation compatible with exported weights
  • ModelLoader.java — Loads model.json from classpath and constructs the inference model
  • LogisticRegressionService.java — Bridges feature extraction and ML prediction
  • Updated AnalyzeService.java — Integrates C2PA logic + ML fallback with clear override hierarchy
  • Various debugging utilities, architectural recommendations, and corrections to CSV parsing logic

Verification

AI-assisted work was validated by:

  • Manual inspection and testing of DatasetBuilder output
  • Successful cross-validation runs on ~80,000 training samples
  • Confirming stable and consistent LR validation metrics across folds
  • Verifying that exported weights from Python produced correct inference behavior in Java
  • Manually testing AnalyzeService end-to-end with multiple categories of images:
    • Images with valid AI manifests
    • Images with valid camera manifests
    • Images with no C2PA manifest
    • Images with corrupted or tampered manifests
  • Ensuring the Java inference pipeline correctly loads model.json from classpath and returns deterministic probability scores

Attribution Statement

Portions of this commit or configuration were generated with assistance from OpenAI ChatGPT (GPT-5) on 12/1/2025. All AI-generated content was reviewed, verified, and finalized by the development team.


Commit / Ticket Reference

  • Commit: chore/memory-c2pa-streaming-and-tests
  • Ticket: none
  • Date: 2025-12-02
  • Team Member: Jalen Stephens

AI Tool Information

  • Tool Used: OpenAI ChatGPT (GPT-5) via Codex CLI
  • Access Method: Local Codex CLI session (sandboxed; no paid API calls)
  • Configuration: Default model settings
  • Cost: $0 (course-provided access)

Purpose of AI Assistance

Implemented memory- and OS-safe changes: streamed uploads to Supabase, hardened c2patool invocation, capped multipart size, reused existing analysis results instead of re-running, gated integration tests to Linux, and added JSON parsing + storage edge-case tests to keep coverage high on macOS/Linux.


Prompts / Interaction Summary

  • “Here’s a prompt you can paste into VS Code for Copilot/Codex… Goals: Fix c2patool binary usage, limit upload size, tune JVM memory”
  • “can you increase branch coverage test here: SupabaseStorageService.java”
  • “can you increase branch coverage in : C2paToolInvoker.java”
  • “okay can you fill out a template in citations.md and put it in the citations.md file and also give me a commit message for all the changes we made”

Resulting Artifacts

  • src/main/java/dev/coms4156/project/metadetect/c2pa/C2paToolInvoker.java
  • src/main/java/dev/coms4156/project/metadetect/service/ImageService.java
  • src/main/java/dev/coms4156/project/metadetect/service/SupabaseStorageService.java
  • src/main/java/dev/coms4156/project/metadetect/service/AnalyzeService.java
  • src/main/resources/application.properties
  • src/test/java/dev/coms4156/project/metadetect/c2pa/C2paToolInvokerIntegrationTest.java
  • src/test/java/dev/coms4156/project/metadetect/c2pa/C2paToolInvokerJsonParsingTest.java
  • src/test/java/dev/coms4156/project/metadetect/service/ImageServiceTest.java
  • src/test/java/dev/coms4156/project/metadetect/service/SupabaseStorageServiceTest.java
  • README.md

Verification

  • mvn test (macOS; JaCoCo warns about class file major version 68 but tests pass)

Attribution Statement

  • The AI assisted in designing and implementing streaming uploads, safer c2patool invocation, analysis reuse, and cross-OS test coverage improvements.

AI-Assisted Change Log

  • Date: 2025-12-04
  • Author: Jalen Stephens
  • AI Tool: OpenAI ChatGPT (GPT-5) via Codex CLI
  • Purpose:
    • Swap logistic regression weights/bias to the new provided model and ensure the loader uses metadetect.model.path=classpath:/model.json.
    • Add inference logging for /api/analyze to surface C2PA/no-manifest cases and model probabilities in Heroku logs.
    • Increase branch coverage: C2paToolInvoker JSON parsing (null/blank input, fallback manifest) and AnalyzeService (reuse pending analyses, defensive parsing of malformed details, screenshot reason inference).
  • Files Touched:
    • src/main/resources/model.json
    • src/main/java/dev/coms4156/project/metadetect/service/ModelLoader.java
    • src/main/resources/application.properties
    • src/main/java/dev/coms4156/project/metadetect/service/AnalyzeService.java
    • src/test/java/dev/coms4156/project/metadetect/c2pa/C2paToolInvokerJsonParsingTest.java
    • src/test/java/dev/coms4156/project/metadetect/service/AnalyzeServiceTest.java
  • Verification: mvn test (passes; JaCoCo warns about class file major version 68 when running on Java 20/21)
  • Attribution Statement: Portions of this work (model loading/logging, test additions) were AI-assisted and reviewed/validated by the development team.