# 12 — Git history notes

## Remote & branches

- Origin: `https://github.com/WWBN/Searchmercials`
- Default: `master`
- Live branches:
  - `remotes/origin/master` (production)
  - `remotes/origin/dev_v1.0` (active development)
  - `remotes/origin/fiero01` (engineer-specific branch)

**Branching model**: effectively two-branch (`dev_v1.0` → `master`), with engineer branches occasionally in flight. The high ratio of `Merge remote-tracking branch 'origin/dev_v1.0'` commits on `master` suggests frequent merges without squashing — history is noisy.

## Recent commits (master)

```
fed7e1b  str_replace
7ea37ec  removed uncommited changes in prod (backup june 03, 2024)  ← the "drift reset"
ae0df91  fixed - julius
8c1ea09  Merge remote-tracking branch 'origin/dev_v1.0'
83d9995  make admin show in iframe
289d8f0  replace quote
cbfa4c0  remove primary category
4f9a108  add category
4d0a49b  update onerror
fbc2968  update for videoads - search with category
d06e32b  update for videoads - detail page
6cb196e  update for videoads - search
79c7de5  update for videoads - search
a852b14  update for videoads - bids
79dfdc7  update for videoads
0af8dc8  update for videoads
01e9033  updates for videoads
f358c58  update listing count changes
48e9e52  apply new api
9afe82e  update backfill file
```

## Signal: the "production drift" event

Commit `7ea37ec` ("removed uncommited changes in prod (backup june 03, 2024)") is load-bearing context:

- Production had accumulated untracked edits that diverged from `master`
- Someone pulled those edits back into git and then reset to a known state
- Implies there's no enforced deploy pipeline — engineers (or ops) patch production directly when needed

**What to watch for**: any file whose `git log` last-commit date predates an obvious content change. Those are candidates for undocumented hot-patches that got lost in the reset.

## Authors

Commit authors observed:

- Freddie Unciano (primary)
- Freddie Unciano VSCODE (same person, different machine)
- Fiero / alexious (same person, different handle)
- Bennex Louis M. Edquiba
- fredabel
- julius (mentioned in commit `ae0df91` but not in author list — likely committed under someone else's name)
- root (suspicious — someone committed as the `root` user, probably from a server shell)

**`root` as committer is a red flag**: it means at least once, a change was made directly on the server with `git` invoked from an interactive root session instead of from a developer workstation. Combine with the "production drift" event and the pattern is clear — there's a history of bypassing the pull-request flow.

## Feature timeline (rough)

1. **Pre-2023**: Hyperseek/iWeb core — search engine, bidding, click tracking, PayPal/Auth.net
2. **2023**: Start of videoads retrofit (`79dfdc7 update for videoads`)
3. **2024**: Videoads feature evolution — bids, search integration, detail pages, category filters
4. **2024-06-03**: Production drift reset (commit `7ea37ec`)
5. **Recent**: Category management refinements (`add category`, `remove primary category`), admin iframe wrapping

## Dev workflow observations

- No `CHANGELOG.md` — release history must be reconstructed from commit messages
- No tags — no way to pin a "production as of X" snapshot without a commit SHA
- No CI config files (`.github/workflows/`, `.gitlab-ci.yml`, etc.)
- No `.pre-commit-config.yaml` / linting hooks
- `.gitignore` present but minimal (111 bytes) — may not cover logs, temp files, or the new `.env`

## Recommendations

1. **Tag production releases**: `git tag -a prod-2026-04-13 -m "..."` before/after every deploy; push tags
2. **Adopt a conventional-commits style**: `feat: ...`, `fix: ...`, `chore: ...` so release notes can be auto-generated
3. **Protect `master`**: require PRs, reviews, and a passing CI check before merge
4. **Ban root-committing**: git hooks to reject `root@localhost` as committer
5. **CHANGELOG**: auto-generate from commits with `git-cliff` or `release-drafter` on each tag
6. **Branch cleanup**: merge or delete `fiero01` once work is integrated; long-lived engineer branches are a merge-conflict factory
