Title: feat(forge-cli): persist deterministic history snapshots and expose trends endpoint · Issue #61 · elcode-id/elcode-forge · GitHub
Open Graph Title: feat(forge-cli): persist deterministic history snapshots and expose trends endpoint · Issue #61 · elcode-id/elcode-forge
X Title: feat(forge-cli): persist deterministic history snapshots and expose trends endpoint · Issue #61 · elcode-id/elcode-forge
Description: Context & Objective Enable the dashboard Trends screen (PRD Phase 6 "trends") with per-commit, deterministic health snapshots stored locally in .eforge/history/. Closes EPIC 3B. Branch Name: feat/forge-061-history-trends Parent Epic: EPI...
Open Graph Description: Context & Objective Enable the dashboard Trends screen (PRD Phase 6 "trends") with per-commit, deterministic health snapshots stored locally in .eforge/history/. Closes EPIC 3B. Branch Name: feat/f...
X Description: Context & Objective Enable the dashboard Trends screen (PRD Phase 6 "trends") with per-commit, deterministic health snapshots stored locally in .eforge/history/. Closes EPIC 3B. Branc...
Opengraph URL: https://github.com/elcode-id/elcode-forge/issues/61
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(forge-cli): persist deterministic history snapshots and expose trends endpoint","articleBody":"## Context & Objective\nEnable the dashboard Trends screen (PRD Phase 6 \"trends\") with per-commit, deterministic health snapshots stored locally in `.eforge/history/`. Closes EPIC 3B.\n\n- **Branch Name:** `feat/forge-061-history-trends`\n- **Parent Epic:** EPIC #54 (Phase 3B)\n- **DAG Dependencies:** Requires #60 (Sub-Issue 3.5)\n- **Estimated Size:** \u003c 250 LOC\n\n## Crate & File Target\n- `crates/forge-cli/src/commands/history.rs` *(NEW)*\n- `crates/forge-cli/src/commands/report.rs` *(MODIFY — `--save-history`)*\n- `crates/forge-cli/src/serve/routes.rs` *(MODIFY — `/api/v1/history?limit=`)*\n\n## Strict Input/Output Rust Type Contract\n```rust\n#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]\npub struct HistorySnapshot {\n pub head_sha: String,\n pub commit_unix_ts: i64,\n pub overall: u8,\n pub dimensions: BTreeMap\u003cString, u8>,\n pub findings_by_severity: BTreeMap\u003cString, usize>,\n}\n\npub fn save_history_snapshot(repo_root: &Path, bundle: &ReportBundle) -> Result\u003cOption\u003cPathBuf>, ForgeError>;\npub fn load_history(repo_root: &Path, limit: usize) -> Result\u003cVec\u003cHistorySnapshot>, ForgeError>;\n```\n\n## Invariants\n- File name `.eforge/history/\u003ccommit_unix_ts>-\u003csha12>.json`; idempotent per commit; skipped when no git revision.\n- `load_history` sorts by `commit_unix_ts` ascending and ignores malformed files.\n\n## Definition of Done (Tier 2 Verification Gate)\n```bash\ncargo fmt --package forge-cli -- --check\ncargo clippy --package forge-cli --all-targets -- -D warnings\ncargo test --package forge-cli -- commands::history::tests serve::\n```\n## Global Invariants (AGENTS.md)\n- GitFlow: branch off `develop`, PR targets `develop`, squash-merge, update `docs/ARCHITECTURE_STATE.md`.\n- Zero-panic in `crates/forge-*` (no `unwrap/expect/panic/todo/unimplemented`); Rust core stays 100% UI-agnostic.\n- Determinism: identical repo state + config => byte-identical output (no wall-clock timestamps).\n- Repository text is hostile input: never rendered via `{@html}`, never executed.\n- Plan reference: Phase 3 Dashboard Plan (approved 2026-10-19).\r\n","author":{"url":"https://github.com/luksluki","@type":"Person","name":"luksluki"},"datePublished":"2026-10-19T07:23:20Z","url":"https://github.com/elcode-id/elcode-forge/issues/61"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2d45d90e-d0c7-49fd-fa76-5cc74ac87cc5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CAB2:3F0A0F:1824C8:20EE7D:6B059823 |
| html-safe-nonce | fb3e77741296925546136adb6e93d7dd0f695cfb9eb4b3f42489c9a7c10f2a3a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQUIyOjNGMEEwRjoxODI0Qzg6MjBFRTdEOjZCMDU5ODIzIiwidmlzaXRvcl9pZCI6IjMxMjc2Njg3NjM4Mjc0NzY1MTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5eec778353605696b04977ca942c6abd28f5d366242fd9988bf19e3615a6ab6f |
| hovercard-subject-tag | issue:5919653936 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/elcode-id/elcode-forge/61/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7cd05e40c557c71f424bd0f38a6d2b62b10fde430721529305c954dc14560453/elcode-id/elcode-forge/issues/61 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7cd05e40c557c71f424bd0f38a6d2b62b10fde430721529305c954dc14560453/elcode-id/elcode-forge/issues/61 |
| og:image:alt | Context & Objective Enable the dashboard Trends screen (PRD Phase 6 "trends") with per-commit, deterministic health snapshots stored locally in .eforge/history/. Closes EPIC 3B. Branch Name: feat/f... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | luksluki |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3b72fd2385d76a50ce0fe937d50bb4a81434432c4fd47866074a26f6cd03623f |
| turbo-cache-control | no-preview |
| go-import | github.com/elcode-id/elcode-forge git https://github.com/elcode-id/elcode-forge.git |
| octolytics-dimension-user_id | 337957755 |
| octolytics-dimension-user_login | elcode-id |
| octolytics-dimension-repository_id | 1423983661 |
| octolytics-dimension-repository_nwo | elcode-id/elcode-forge |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1423983661 |
| octolytics-dimension-repository_network_root_nwo | elcode-id/elcode-forge |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 58e2bd32336f3dcee343ec627a4d09c7c444e214 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width