Commit Graph
101 Commits
Author SHA1 Message Date
haylan 20e943a2b5 docs(claude): document SQLite store, refetch command, and phpstan script
Update the architecture diagram and env var table to reflect the
ContributionStore tier and incremental fetch, document the
graph:contributions:refetch command, and note composer phpstan next to
the existing test commands.
2026-07-12 23:44:04 +02:00
haylan cf7bd8d70c docs(readme): correct outdated deploy docs and docker-compose examples
README had drifted from the codebase: wrong test path, a stale /health
sample response, a docker-compose volume mount pointing at a path the
image never writes to (with no SQLite data volume at all), a missing
CONTRIBUTIONS_RETENTION_DAYS example, and an architecture diagram
predating the SQLite store/refetch command. Also fixes
docker-compose.prod.yml, which was missing the data volume and
CONTRIBUTIONS_RETENTION_DAYS env var present in docker-compose.yml —
without it, a prod deployment on this file loses contribution history
on every container recreate.
2026-07-12 23:43:59 +02:00
haylan de831beaaa chore(phpstan): raise analyser memory limit and record resolved findings
Add --memory-limit=512M to the phpstan composer script — the default
128M crashed the level-8 run under parallel workers. Update
PHP-Stan-Errors.md to note all 22 catalogued findings are now resolved.
2026-07-12 23:43:52 +02:00
haylan 9c028aaf5e docs(phpdoc): document public methods across src/
Add professional PHPDoc (summary + @param/@return) to the remaining
public methods that had none or only partial coverage: GraphController's
actions, ContributionStore's accessors, SvgRenderer's render() and
private helpers (with concrete array-shape annotations), ProbeTrait,
ProviderHealthChecker, ProviderStatus, and the Contribution entity.
Also adds the matching @return shapes on SvgRendererTest's data
providers.
2026-07-12 23:43:31 +02:00
haylan 8e349c961b fix(entity): re-index ContributionCollection constructor arguments
array_map() over the variadic constructor can produce non-sequential or
string keys, which doesn't match the array<int, Contribution> property
type; re-index with array_values(). Also documents the iterator/count
accessors.
2026-07-12 23:43:01 +02:00
haylan 14ea788522 fix(renderer): coerce strtotime() result to int before formatting dates
date() expects int|null, but strtotime() returns int|false; cast to make
the type explicit for PHPStan level 8 (the date strings are always
well-formed here, so strtotime() never actually returns false).
2026-07-12 23:42:50 +02:00
haylan 4ff45b7c46 feat(store): fetch contributions incrementally and persist history in SQLite
Bound each provider's startFetch()/resolveFetch() to an optional
since/until window, wire a SQLite-backed ContributionStore into
ContributionAggregator (fetch only the trailing window past the last
stored date, merge into the store, prune by CONTRIBUTIONS_RETENTION_DAYS),
and add a graph:contributions:refetch command to force a full or ranged
re-fetch in <=365-day chunks. This is the root fix for the full
365-day-refetch timeout that used to hit on every cache miss.
2026-07-12 23:42:41 +02:00
haylan 41e88144a4 chore(namespace): rewirtten namspeace from app to GitContributionGraph. 2026-07-12 22:47:34 +02:00
haylan 91bda21f89 feat(phpstan): added php stan 2026-07-12 12:43:54 +02:00
haylan 0d7cf68771 chore(todo): checked php stan instalation and configuration. added document php stan erros as well to update readme docs 2026-07-12 12:43:33 +02:00
haylan e7f14dfd35 chore(doc): documentet all public methods 2026-07-12 12:27:42 +02:00
haylan 095f3e0253 feat(db): wired databas into services config 2026-07-12 12:25:00 +02:00
haylan e2a324b74a chore(todo): expanded todo to fix a live bug 2026-07-12 12:23:31 +02:00
haylan a76ed6efc8 chore(todo): mark completed tasks and expand step 3 detail 2026-07-11 16:46:50 +02:00
haylan bce564d68b docs(readme): fix phpunit command paths
There is no bin/phpunit (only bin/console) — the binary lives at
vendor/bin/phpunit, matching CLAUDE.md's documented commands.
2026-07-11 16:46:47 +02:00
haylan b3dc7a2298 fix(docker): target the dev stage when building for local development
docker-compose.override.yml only overrode the dockerfile, so it kept
inheriting target: final from docker-compose.yml — but Dockerfile.dev
is single-stage and has no final stage, so the dev build failed. Name
the stage in Dockerfile.dev and target it explicitly from the
override.
2026-07-11 16:46:29 +02:00
haylan 9087f91855 feat(store): finish ContributionStore and add typed entities
- Fix add()'s upsert SQL (was invalid SQL from typos) and use it for
  the new merge() as well.
- Fix remove()'s missing FROM keyword and drop the unindexed LIKE scan
  in favor of an exact match.
- Add latestDate(), all() with optional sinceDays filtering, and
  prune() with a retention-day cutoff.
- Add Contribution (immutable value object) and ContributionCollection
  (IteratorAggregate + Countable) so all() returns something typed
  instead of a raw date => count array.
- Cover all of the above with unit tests against an in-memory SQLite
  database.
2026-07-11 16:46:21 +02:00
haylan 885dec357e refactor(github): build GraphQL query without the client bundle
The eightpoints/guzzle-bundle and idci/graphql-client-bundle only
existed to build one near-static query string, and the bundle's own
HTTP transport was already bypassed in favor of Symfony HttpClient.
Build the query with sprintf/json_encode instead, drop both bundles
from config/bundles.php, and update the test double accordingly.
2026-07-11 16:46:11 +02:00
haylan 78e7a72ee9 fix(provider): normalize baseUrl before assigning readonly property
Promoted readonly properties can't be reassigned in the constructor
body, so GitLabProvider and GiteaProvider threw on every instantiation.
Normalize the plain parameter first, then assign to a separately
declared readonly property.
2026-07-11 16:46:04 +02:00
haylan c929fdfda6 feat(db): prepared add and remove function 2026-07-08 20:20:42 +02:00
haylan 3d2c0487b7 feat(store): fist stepts for implement ContributionStore for managing contributions in SQLite 2026-07-08 06:50:56 +02:00
haylan cb89a1c6b9 chore(docker): update volume mappings for development environment 2026-07-08 06:50:39 +02:00
haylan 5e27a5bc93 fix(provider): dedoupet base URL is properly formatted in GitLab and Gitea providers 2026-07-08 06:50:25 +02:00
haylan f52a3449c6 chore(TODO): mark completed tasks and update contribution store details 2026-07-08 06:49:28 +02:00
haylan ca94b80beb chore(composer): remove deprecated Guzzle and GraphQL client configurations 2026-07-08 06:49:18 +02:00
haylan cd326a34ba chore(controller): lower set_time_limit now that fetching is concurrent
Providers fetch in parallel now (cost ~= max, not sum), so the old
90s stopgap for the 3-sequential-providers-plus-pagination worst case
can come back down toward the 30s default, with headroom for
pagination and per-request HTTP timeouts.
2026-07-07 13:32:17 +02:00
haylan 8fb7781227 test(aggregator): cover concurrent fetch failure modes
Mocks startFetch()/resolveFetch() instead of fetch(), and splits the
old single failure test into separate start-throws and
resolve-throws cases since those are now distinct call sites.
2026-07-07 13:32:11 +02:00
haylan 1e2f022579 test(gitlab): exercise startFetch()/resolveFetch() instead of fetch() 2026-07-07 13:32:05 +02:00
haylan c89b4e9212 test(gitea): exercise startFetch()/resolveFetch() instead of fetch() 2026-07-07 13:31:59 +02:00
haylan 5c47888a49 test(github): exercise startFetch()/resolveFetch() instead of fetch() 2026-07-07 13:31:52 +02:00
haylan f2bf24994c test(provider): update ProbeTraitTest stub for split fetch API
The anonymous ProviderInterface implementation needs startFetch()/
resolveFetch() instead of fetch() to stay loadable.
2026-07-07 13:31:44 +02:00
haylan fcf841f7ad feat(aggregator): fetch all providers concurrently
aggregate() now fires every configured provider's startFetch() in one
pass before resolving any of them, so wall-clock cost is roughly
max(providers) instead of sum(providers). Partial-failure isolation
and per-date summation behavior are unchanged.
2026-07-07 13:31:36 +02:00
haylan 9b631f4777 refactor(gitlab): make GitLabProvider fetch non-blocking
startFetch() resolves the user id and fires the first events page,
returning a handle without reading it; resolveFetch() continues the
existing do/while pagination starting from that first response.

Pagination itself stays sequential within this provider since each
page depends on the previous one - parallelism here only spans across
providers, not within GitLab's own pages.
2026-07-07 13:31:30 +02:00
haylan 596260bb85 refactor(gitea): make GiteaProvider fetch non-blocking
startFetch() fires the heatmap GET and returns the response without
reading it; resolveFetch() does the .toArray()/parse/log work.
2026-07-07 13:31:21 +02:00
haylan 9f3c54afd1 refactor(github): make GitHubProvider fetch non-blocking
startFetch() fires the GraphQL POST and returns the response without
reading it; resolveFetch() does the .toArray()/parse/log work that
used to happen inline right after the request.
2026-07-07 13:31:15 +02:00
haylan 11bec43bbe refactor(provider): split fetch() into startFetch()/resolveFetch()
Splits the provider contract into a non-blocking startFetch() that
fires the HTTP request(s) and a resolveFetch() that reads the result,
so callers can fire every provider's request before blocking on any
of them. Symfony HttpClient is already async under the hood -
request() doesn't block until you read the response - so this needs
no new dependency.
2026-07-07 13:31:09 +02:00
haylan 09c0be8312 config: cap http_client timeout and max_duration
Per-request bounds so a single slow/hung provider can't stall the
whole request indefinitely once fetching happens concurrently.
2026-07-07 13:31:03 +02:00
haylan 6d6680ca37 fix(di): correct provider service FQCNs in services.yaml
Providers were moved into the App\Service\Provider namespace, but
services.yaml still tagged/configured them under the old App\Service
FQCNs, so the _instanceof conditional never matched and the container
failed to compile.
2026-07-07 13:30:57 +02:00
haylan 406da07397 chore(todod): proposal plane for sotaged the history 2026-07-02 07:30:01 +02:00
haylan d5d948f423 Merge pull request 'chore(deps): update dependency eightpoints/guzzle-bundle to v8.7.0' (#11) from renovate/eightpoints-guzzle-bundle-8.x-lockfile into main
Reviewed-on: #11
2026-06-23 17:14:32 +00:00
renovate-bot a6e904fc61 chore(deps): update dependency eightpoints/guzzle-bundle to v8.7.0 2026-06-23 12:01:52 +00:00
haylan 980463f715 Merge pull request 'Update renovate.json' (#10) from change-renovate-configuration into main
Reviewed-on: #10
2026-06-04 00:44:33 +02:00
haylan 095b9675f9 Update renovate.json 2026-06-04 00:44:18 +02:00
haylan 8dbfef8496 Merge pull request 'refactor: reorgeniced Service/ into Provider/ and Renderer/ sub-namespaces' (#9) from refactor/service-namespaces into main
Reviewed-on: #9
2026-06-04 00:42:43 +02:00
haylan a527eada56 Merge pull request 'feat: add contribution graph favicon (ICO + PNG)' (#8) from feat/favicon into main
Reviewed-on: #8
2026-06-04 00:42:37 +02:00
haylan 423ac5470d Merge branch 'main' into refactor/service-namespaces 2026-06-04 00:42:28 +02:00
haylan 4e992c8f79 Merge branch 'main' into feat/favicon 2026-06-04 00:42:11 +02:00
haylan 4983492088 Merge pull request 'chore(config): migrate Renovate config' (#7) from renovate/migrate-config into main
Reviewed-on: #7
2026-06-04 00:31:09 +02:00
renovate-bot 169fa8c76a chore(config): migrate config renovate.json 2026-06-03 22:29:25 +00:00
haylan 4cefba1a37 Merge pull request 'chore: Configure Renovate' (#5) from renovate/configure into main
Reviewed-on: #5
2026-06-03 10:42:26 +02:00