Skip to content

Obvious onboarding: local dev contract (.obvious/) - #154

Open
obvious-autobuild-dev[bot] wants to merge 1 commit into
masterfrom
obvious/local-dev-onboarding
Open

Obvious onboarding: local dev contract (.obvious/)#154
obvious-autobuild-dev[bot] wants to merge 1 commit into
masterfrom
obvious/local-dev-onboarding

Conversation

@obvious-autobuild-dev

Copy link
Copy Markdown

Obvious Onboarding — Local Dev Contract

This PR adds the .obvious/ agent guidance contract for this repository, generated after a full local-dev onboarding run in the repo sandbox.

Files generated

File Purpose
.obvious/obvious.md Top-level agent guidance: stack, commands, verification summary, snapshot info, gotchas
.obvious/codebase-map.md Folder-level overview (depth-capped table) + request flow
.obvious/config.yml Repo policy auto-detected from GitHub settings (default branch master, merge method merge, deleteBranchOnMerge: false)
.obvious/skills/local-dev/SKILL.md Durable local-dev onboarding record (resume-from-snapshot and fresh-clone paths)

Source files scanned

  • README.md (installation, extending, deploy, FAQ), ISSUE_TEMPLATE.md, .gitignore, .htaccess, .user.ini
  • index.php, application/config/config.php, database.php, routes.php, autoload.php, assets.php, aws_s3.php, profiler.php, migration.php, production/database.php
  • application/core/MY_Controller.php, all 9 controllers, application/helpers/csvjson_helper.php, application/libraries/
  • application/views/ (layout + tool views), js/src/ + js/csvjson/ (conversion libraries), js/3rd/, css/, img/
  • system/ (CodeIgniter 2.1.4 — scanned for PHP 8 compatibility, unmodified)

Local dev validation result

dev_stack_healthy: true — verified on PHP 8.4.24 / MariaDB 11.8.6 / Debian 13:

  • Home + all 7 tool pages (/csv2json, /json2csv, /sql2json, /json_validator, /json_beautifier, /csvjson2json, /datajanitor) return HTTP 200 with zero PHP error output and a clean <!DOCTYPE html> start
  • All 39 development asset files referenced in application/config/assets.php exist and serve HTTP 200
  • Primary user flow (browser E2E, Chromium 151 + puppeteer-core): loaded /csv2json, typed CSV into #csv, clicked #convert, #result contained the correct JSON — zero browser console errors (screenshot captured)
  • Conversion library verified headless in node (array + hash modes)
  • POST /csv2json/instrument writes rows to MariaDB csvjson.csv (verified by SELECT)
  • php -l over all 63 application/ + 127 system/ PHP files
  • Security: /system/..., /.git/..., /README.md return 403 via the dev router

Sandbox snapshot

  • ID: ob0wxtf01k11upr6a1dv:default (sandbox i01p5umk7ly564q1bj9mc)
  • Captured: 2026-08-24T16:23:53.945Z
  • State: PHP dev server running on 127.0.0.1:8080, MariaDB running with csvjson database seeded, dev config overrides and router.php in place

Blockers

None. The dev stack gate passed.

Explicit omissions

  • No test suite / linter / CI config exists in this repophp -l syntax checks are the only static verification available; no unit tests were run because there are none.
  • router.php is intentionally NOT committed — it is an untracked dev-server router for the PHP built-in server (documented in SKILL.md, included in the sandbox snapshot). Production uses Apache + .htaccess.
  • application/config/development/ overrides are intentionally NOT committed — the directory is gitignored by the repo itself; contents are documented in SKILL.md for fresh-clone recreation.
  • AWS S3 mode is not wired up locallyapplication/libraries/s3.php contains a pre-existing PHP 8 parse error (PHP 5-era curly-brace string offset) and local dev uses disk-based permalink storage instead. No AWS secrets were requested or needed.
  • File upload path not exercised/csv2json/upload is a PHP 5-era path expecting $_FILES['file']; the primary textarea-based conversion flow was verified instead.

Local dev verified: PHP 8.4 + MariaDB 11.8, all tool pages HTTP 200,
browser E2E CSV->JSON conversion passes, telemetry DB writes verified.
Sandbox snapshot ob0wxtf01k11upr6a1dv:default captured.

@obvious-autobuild-staging obvious-autobuild-staging Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Obvious Code Review

Verdict: COMMENT (2 Medium findings)

Summary

  • Blocker: 0
  • High: 0
  • Medium: 2

Medium

  • .obvious/obvious.md:68 — ENVIRONMENT detection misdocumented: omits the $_ENV['DOMAIN_NAME'] requirement
  • .obvious/codebase-map.md:3 — File counts contradict the stated "git-tracked files only" methodology

Claims verified against the repo during review: config.yml repo settings (default branch, merge methods, delete-branch-on-merge), both PHP 8 parse-error locations (s3.php:2582, Profiler.php:70), hardcoded production base_url, default controller, instrument() schema vs the SKILL.md SQL, /csv2json/upload path, and .gitignore coverage of the dev overrides. No secrets in the diff.


View full review in Obvious

Comment thread .obvious/obvious.md
- **Profiler library is PHP 5 only:** `system/libraries/Profiler.php` line 70 has the same parse error; profiler is not enabled in dev.
- **File upload path is PHP 5 era:** `js/src/csv2json.js` posts to `/csv2json/upload`; the request reaches `csvjson_helper.php` expecting `$_FILES["file"]`, and a bare POST emits a pre-existing PHP 8 warning ("Undefined array key \"file\""). Type/paste CSV instead of uploading files.
- **Base URL:** production `base_url` is hardcoded to `https://csvjson.com/` in `application/config/config.php`; the development override points it at `http://127.0.0.1:8080/`.
- **ENVIRONMENT:** `index.php` picks `production` when `SERVER_NAME` contains `csvjson.com`, else `development`. Localhost always gets development (unminified assets from `js/src/`).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium · hygiene — ENVIRONMENT detection is misdocumented: the doc says index.php picks production "when SERVER_NAME contains csvjson.com", but the actual check (index.php:21-25) is isset($_ENV['DOMAIN_NAME']) && strpos($_SERVER['SERVER_NAME'], $_ENV['DOMAIN_NAME']) !== FALSE — production also requires the DOMAIN_NAME env var to be set. An agent following this contract to simulate or audit production mode (minified bundles, production config, /build) will set SERVER_NAME to a csvjson.com host, silently still get development, and draw wrong conclusions about prod behavior. The same claim appears in codebase-map.md (request flow) and skills/local-dev/SKILL.md (gotchas). Fix: state the actual condition — production only when $_ENV['DOMAIN_NAME'] is set and contained in SERVER_NAME (prod sets DOMAIN_NAME=csvjson.com); otherwise development.

Comment thread .obvious/codebase-map.md
@@ -0,0 +1,28 @@
# Codebase Map — FlatFilers/csvjson-app

Depth-capped folder overview. File counts include git-tracked files only.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Medium · hygiene — File counts contradict the header's "git-tracked files only" methodology. Verified against the git trees API: application/ is 81 in the doc but 78 tracked; application/config/ is 20 vs 17; root is 12 vs 11 — each inflated by untracked sandbox files (the 3 config/development/ overrides and router.php). The rows also never sum to the stated total (scaffolding row says 10, tracked is 11; the 2 files directly in application/.htaccess, index.html — appear in no row). Counts that do check out: system/ 149, js/ 93, views/ 27, controllers/ 10, core/ 2, helpers/ 3, libraries/ 5, js/*.min.js 4, css/ 4, img/ 17. Fix: recount from git ls-files, or reword the header to "counts from the onboarding sandbox working tree (includes untracked dev files)".

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