Skip to content

fix(thesis): apply review remediations - #4

Merged
qingfa-dev merged 52 commits into
devfrom
chore/thesis-review-remediation
Aug 25, 2026
Merged

qingfa-dev merged 52 commits into
devfrom
chore/thesis-review-remediation

Conversation

@qingfa-dev

Copy link
Copy Markdown
Owner

Summary

This PR applies thesis review remediations across multiple chapters, fixing formatting, content issues, and rebuilding the PDF output.

Changes

  • Background chapter: Updated Python ML sidecar section
  • Architecture chapter: Fixed database design, API design, and security design sections
  • Implementation chapter: Corrected vertical slice, CBIR search, model config, and ecommerce core sections
  • Evaluation chapter: Updated testing strategy, testing results, and retrieval performance sections
  • VSA Core: Applied fixes to the vertical slice architecture core module
  • PDF output: Removed old main.pdf and added updated thesis PDF with full filename

Files Modified

  • 12 .typ Typst source files updated
  • 1 PDF file rebuilt and renamed with proper naming convention

Testing

  • All changes are documentation/thesis content only
  • PDF has been rebuilt from updated Typst sources
  • No code changes that affect application behavior

Review Notes

Please review the updated thesis content for:

  • Formatting consistency
  • Technical accuracy of descriptions
  • Proper citation and reference formatting
  • Readability and clarity of explanations

…13% in Ch1

Replace three '15 to 20%' occurrences with the oracle-recomputed
Fashion-CLIP vs CLIP-generic mAP difference (2.13%) from the
category-only benchmark (Appendix A.1 / §3.5).

Fix EfficientNet-B0 trade-off from '3.4 percent lower mAP@10' to
'4.65% lower mAP' per the Fashion-CLIP vs EfficientNet-B0 oracle
figure.
…t 3 Limitations

- nine bounded contexts → eight (§2.3.1)
- 88 FR / nine modules → 87 FR / eight modules (§2.1 opening + ch2 intro bullets + API caption)
- near-zero P@20 → ~0.30 enriched-label figure (Part 3 Limitations)
…Dimensions contradiction

Task 13: Update all prose locations to use actual Carter route
api/storefront/catalog/products/images/search and correct the stated
API convention from /api/{module}/{surface}/{resource} to
/api/{surface}/{module}/{resource} to match implemented routes.

Task 14: Reframe the 'Variable Vector Dimensions' bullet in §2.3.4.4
to acknowledge the fixed vector(512) column and document that deploying
other dimensionalities requires schema changes.

Files changed:
- 05-api-design.typ: convention now surface-first
- ml-sidecar.typ: §2.4.4.3 URL corrected (was /api/admin/catalog/storefront/...)
- frontend-ux.typ: §2.4.5.1 URL corrected (was /api/storefront/search-by-image)
- vsa-core.typ: convention mirror updated
- 03-cbir-search.typ: stale duplicate URL corrected
- P2S2.2.4_cbir-search-sequence.puml: diagram URL corrected
- 04-database-design.typ: Variable Vector Dimensions reframed as fixed+future
…e TOC

- Task 15: Replace phantom 'Section 2.1.5' with 'Section 1.4.2' in
  database-design.typ and data-persistence.typ (HNSW/IVFFlat comparison
  lives in Ch1 §1.4.2, not a nonexistent Ch2 §2.1.5).
- Task 16: Change 'five visual search states' to 'four' in
  f1-visual-search.typ to match Table 58's four rows (Empty, Upload,
  Loading, Results).
- Task 17: Rewrite Part 1 §VI Thesis Outline to reflect the real
  three-part TOC structure (no phantom 'Chapter 4', no 'five chapters').
… claim (tasks 18-22)

- PostgreSQL 16 → 17 in benchmark hardware table
- pgvector 0.3.2 → 0.7.0 in technology stack table
- Permission format standardized to dot-separated domain.category.resource.action (7 files)
- Storefront use case count corrected from eight to nine
- Accuracy metrics standardized: 3 families (mAP, P@K, R@K) at 3 depths = 7 columns
- Softened unsupported 30% search-abandonment claim in Part 1 and Ch1 background
… sampling method

Task 23: Fix mis-citations in Requirements Traceability table (Table 70):
- 'Validate pgvector feasibility': Section 2.2.4 → 2.3.4, 2.3.3 → 2.4.3
- 'Set up vector search': Section 2.2.4 → 2.3.4, 2.3.3 → 2.4.3
- RQ3: Section 3.5 → 3.7 (RQ3 answer is in Synthesis section)
- RQ2: Sections 3.3-3.5 → 3.3-3.6 (include efficiency metrics)
- 'Benchmark embedding': Sections 3.2-3.5 → 3.2-3.7 (include synthesis)
- 'Evaluate results': Sections 3.2-3.5 → 3.2-3.7 (include synthesis)

Task 24: Fix Appendix B.1 sampling description:
- Replace 'chosen sequentially' with 'sampled via stratified random sampling'
- Split script uses per-category shuffling with seed 42 (stratified k-fold)
…precision, architecture families

- RQ1 answer (05-retrieval-performance.typ:38): rewrite 'exceeds upper bound of every other model' to acknowledge CLIP-generic CI overlap (0.9173 < 0.9269), separation holds only for CNN models
- ch4-conclusion: standardize percentages to 2-decimal precision (2.1%→2.13%, 4.7%→4.65%, 5.1%→5.10%, 95.5%→95.55%)
- ml-sidecar.typ: 'four architecture families'→'three' to match Table 55's 3-family grouping (CNN/ViT/CLIP)
- ml-sidecar.typ: example inference_ms 92.0→96.8 to match authoritative benchmark
- Makefile: add charts target (make charts regenerates 5 benchmark PNGs)
- 5 PNG charts regenerated from authoritative JSON (mAP, precision, recall, latency, throughput)
- 2 Typst diagram tables updated (thesis_aggregate.typ, thesis_efficiency.typ)
- PlantUML CBIR sequence diagram regenerated (P2S2.2.4)
- main.pdf rebuilt
- thesis/spec/verify_remediation.py (verification oracle)
- thesis/spec/remediation-log.md (full audit trail)
- thesis/spec/regenerate_charts.py (chart regeneration script)
…eview reports

- citation-check-report.md: 37 entries verified, 3 fixes (page numbers, year), 14 orphans, 0 missing
- revision-roadmap.md: 28 findings parsed, all addressed, 14 positive claims catalogued
- literature-review-report.md: search strategy, 20+ annotated sources, literature matrix, research gaps
- bibliography.bib: 3 corrections (zhai2023sigmoid pages, liu2022convnext pages, johnson2019billion year)
Weighted total: 7.0/10. 2 critical issues identified:
- C1: 'Statistically meaningful separation' needs caveat about 3-fold underpowering
- C2: Enriched-label evaluation claim has no supporting data
4 important + 5 minor issues documented. Remediation successful.
- C1 (05-retrieval-performance.typ:36): add caveat that 3-fold underpowers formal significance testing; non-overlapping bounds presented as indicative
- C2 (ch4-conclusion.typ:37): add explicit reference to Appendix A.2/A.3 for enriched-label evaluation claim (data was present in appendices, just uncited)
- 2 prose em dashes replaced with commas/parentheses
- 26 use-case table header em dashes replaced with colons (11 files)
- Only remaining em dash: Vietnamese national motto on confirmation page (fixed slogan, not prose)
- typst compile exits 0
…re families

- Table 55 (ml-sidecar.typ): reduced from 11 rows to 6 (efficientnet-b0, resnet-50, dinov2-vits14, clip-vit-b16, openclip-vit-b-32, fashion-clip)
- 'three architecture families' → 'four' (CNN, ViT, CLIP, Fashion-specific)
- All 6 prose 'eleven'/'11' occurrences → 'six'/'6'
- typst compile exits 0
- Rename all model registry keys from hyphens to underscores
  (fashion-clip -> fashion_clip, clip-b32 -> clip_b32, etc.)
- Add 6 missing YAML model configs (clip_generic, clip_vit_b16,
  convnext_tiny, dinov2_vits14, efficientnet_b0, resnet50)
- Update 11_generate_embeddings.py to seed all 11 models with
  resume support (incremental writes after each model)
- Expand MODEL_INPUT_SIZES in shared.py for all 11 models
- Update THESIS_MODEL_KEYS, CLI docstrings, and all test files
- Verified: 145/145 unit tests pass, ruff lint clean
…fication

- d-database.typ: add db-table helper, reduce spacing (2pt), 12pt base
  font, 7.5pt table text, 0.3pt strokes, 33 headings renamed to Title Case
- data-persistence.typ: remove backticks from isolation level cell
- ml-sidecar.typ: reformat fashion-clip table row and image path
- P2S2.2.4_cbir-search-sequence.png: regenerate diagram
- remediation-log.md: add S4-1 screenshot remediation row
- verify_remediation.py: add 46-PNG expected list and 6-fabricated check
Visual search always fell back to fashion_clip because model_name was
sent as a multipart form field, but FastAPI binds plain scalar params
from the query string. The form field was silently ignored, so the
default settings.EMBEDDING_MODEL was used on every request.

- C# client: append model_name as query string on /embeddings/bytes
- Rename Model -> ModelName / model -> model_name across SPA, API,
  and Python request schemas so all boundaries use a consistent name
- Store SPA sends modelName (camelCase) which [FromForm] binds to
  ModelName; the C# client then sends model_name to the sidecar
Rename model identifiers to the snake_case slugs used by the benchmark
registry so C#, the Python sidecar, and the thesis seed data agree:
openclip-vit-b-32 -> clip_b32, fashion-clip -> fashion_clip, etc.

- VariantImageConstant.AIModels: snake_case slugs, drop unregistered
  models, add ResNet50/eva_clip/siglip IDs
- clip.py registry registration matches the new slug
- Update unit/integration tests to the renamed identifiers
…r indexes

Enable storing embeddings of differing dimensions (fashion_clip=512,
resnet50=2048, etc.) instead of a fixed vector(512) column.

- vector column is now untyped; per-model HNSW expression indexes with
  dimension casts are created in DatabaseInitializer after migrations
- VectorSearchService filters by both model name and vector dimension
- Seeder loads per-model JSON files from 012_demo_embeddings/ and
  validates dimensions against ImageEmbeddingConstant
- benchmark demo-seed writes per-model files with a --demo mode for the
  six thesis models
- consolidate the two prior migrations into a single InitialCreate
- Aspire: attach pgAdmin to the Postgres resource for DB inspection
- Add thesis screenshot capture plan; update compiled thesis PDF
… log with detailed descriptions for S4-1 to S4-7, ensuring all screenshots are recaptured and relevant parameters adjusted for accurate documentation.
- Introduced a new peer review simulation document for the thesis titled "Building a Fashion E-Commerce Application with Recommendation and Image-Based Product Search," providing a comprehensive evaluation from multiple perspectives.
- Created a master edit list that compiles all edits from various rewrite files into a single document for easier navigation and application.
- Removed the chart regeneration script as it is no longer needed.
Revise background, design, evaluation, and conclusion chapters per
2026-08-22 review: correct mAP deltas (95.55%->97.2%, 5.5x->2.67x),
clarify six-of-eleven model scope, estimate RAM from parameter counts,
add dataset-imbalance and scale limitations plus ethical considerations,
and cite ImageBind/BLIP-2. Include new review reports and revision
roadmap; rebuild PDF.
Captions exceeded 80 chars and repeated stats already stated in body
text; wordy Goal/Pre-Post/Alternatives cells slowed scanning. Cut to
one identifying phrase, keep scenario steps, IDs, and numbers intact.
Chapter 1 scopes social login out; design chapters still specified
Google OAuth as an in-scope pathway (IDN-FR-03). Drop the requirement,
use-case scenario, C4/deployment integrations, and diagram nodes to
align scope claims with the implemented system.
Page count needed cutting per reviews/2026-08-24-reduction plan:
drop database appendix D (schema already in Section 2.3.4), merge
use-case overview+summary into one combined view, and tighten chapter
framing and prose that restated earlier sections.
ERD-core grew too dense at one scale; split into per-context ERDs with
a dedicated 1600px neutral-theme rule. Fix startwbs output rename and
rerender sources changed by the reduction pass.
Docs described a typed vector(512) column and a single HNSW index on
products; the schema actually stores an untyped vector column with a
model_name filter and per-model partial HNSW indexes. Also correct
Hangfire job cadences, the similarity-threshold wording, and rerender
the ERDs (serif theme, updated schema).
87 flat functional requirements made use-case traceability noisy;
regroup them into 27 requirement groups (CAT-GRP-nn, NFR-GRP-nn, ...)
and reference groups instead of individual FR ids from every use case.
Wrap the erd-core mmdc rule in line continuations and rebuild main.pdf
over the requirement-group, persistence-fix, and prose passes.
Drop AGENTS.md/CLAUDE.md guides (root, app, benchmarks, thesis) and the
opencode plan artifact; reword the comments in build targets and three
features that pointed readers at AGENTS.md rules.
Remove the agent-workflow process doc and strip dangling AGENTS.md /
.harness pointers from codebase docs, scan snapshots, benchmark review
notes, the screenshots plan, PR template, and commenting-guide
citations.
Delete the review-round reports, language audits, rewrite editlists,
and master fixlists under thesis/reviews/ plus the remediation process
spec and plan they were generated from; strip stale AGENTS.md evidence
pointers from the markdown thesis mirrors.
The template styled fenced code blocks but not inline raw spans, so
backticked identifiers fell back to Typst's default mono font and
clashed with the Times New Roman body. Render inline raw in Courier New
at 0.9em; rebuild pdf.
Replace all 235 inline raw spans with #emph (bracket form for plain
tokens, string form for markup-active characters like angle brackets
and underscores) so identifiers set in italic body text instead of a
clashing mono font; drop the now-unused inline-raw show rule and
rebuild pdf. Fenced code blocks are untouched.
@qingfa-dev
qingfa-dev merged commit b9c3636 into dev Aug 25, 2026
0 of 5 checks passed
@qingfa-dev qingfa-dev mentioned this pull request Oct 3, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant