ecoportal-api-graphql 1.3.11 → 1.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.ai-assistance/code/filter_contract_matrix.md +177 -0
  3. data/.ai-assistance/projects/compat-layer-audit/COMPAT_AUDIT.md +244 -0
  4. data/.ai-assistance/projects/template-automatic-build-maintenance/INTENT.md +10 -0
  5. data/.ai-assistance/projects/template-automatic-build-maintenance/TODO.md +11 -0
  6. data/.ai-assistance/projects/template-model-logic/CATEGORY_CATALOG.md +236 -0
  7. data/.ai-assistance/projects/template-model-logic/CLASSIFICATION_SPIKE.md +243 -0
  8. data/.ai-assistance/projects/template-model-logic/DESIGN_NOTE.md +154 -0
  9. data/.ai-assistance/scripts/bridge-inbox-check.sh +75 -0
  10. data/.ai-assistance/skills/procedural-memory/SKILL.md +319 -0
  11. data/.ai-assistance/skills/project-self-docs/SKILL.md +181 -0
  12. data/.ai-assistance/skills/project-self-docs/scripts/self_docs_scan.py +378 -0
  13. data/.ai-assistance/standards-version.json +22 -21
  14. data/.claude/settings.json +150 -146
  15. data/.gitlab-ci.yml +45 -0
  16. data/CHANGELOG.md +58 -0
  17. data/CLAUDE.md +11 -0
  18. data/docs/self-docs/ARCHITECTURE.md +88 -0
  19. data/docs/self-docs/CHANGES.jsonl +12 -0
  20. data/docs/self-docs/COMPLIANCE.md +79 -0
  21. data/docs/self-docs/CONVENTIONS.md +74 -0
  22. data/docs/self-docs/INTEGRATIONS.md +65 -0
  23. data/docs/self-docs/OPERATIONS.md +76 -0
  24. data/docs/self-docs/OVERVIEW.md +64 -0
  25. data/docs/self-docs/STATUS.md +73 -0
  26. data/docs/self-docs/self-docs-index.json +51 -0
  27. data/docs/worklog.md +15 -20
  28. data/lib/ecoportal/api/common/graphql/client.rb +2 -0
  29. data/lib/ecoportal/api/common/graphql/http_client.rb +189 -177
  30. data/lib/ecoportal/api/common/graphql/model/diffable.rb +54 -54
  31. data/lib/ecoportal/api/graphql/base/action.rb +43 -43
  32. data/lib/ecoportal/api/graphql/base/contractor_entity/member_changes.rb +67 -67
  33. data/lib/ecoportal/api/graphql/base/page/data_field/collection.rb +7 -0
  34. data/lib/ecoportal/api/graphql/base/page/data_field/contractor_entities.rb +28 -28
  35. data/lib/ecoportal/api/graphql/base/page/data_field/file_field.rb +25 -25
  36. data/lib/ecoportal/api/graphql/base/page/data_field/image_gallery.rb +24 -24
  37. data/lib/ecoportal/api/graphql/base/page/section_collection.rb +85 -79
  38. data/lib/ecoportal/api/graphql/base/preset_view.rb +17 -17
  39. data/lib/ecoportal/api/graphql/base/register.rb +18 -18
  40. data/lib/ecoportal/api/graphql/compat/filter_translator.rb +63 -28
  41. data/lib/ecoportal/api/graphql/concerns/page_compat.rb +51 -51
  42. data/lib/ecoportal/api/graphql/concerns.rb +14 -14
  43. data/lib/ecoportal/api/graphql/file_upload/client.rb +181 -181
  44. data/lib/ecoportal/api/graphql/fragment/page.rb +85 -85
  45. data/lib/ecoportal/api/graphql/input/action/update.rb +14 -14
  46. data/lib/ecoportal/api/graphql/input/contractor_entity/update.rb +41 -41
  47. data/lib/ecoportal/api/graphql/input/location_structure/apply_commands.rb +47 -47
  48. data/lib/ecoportal/api/graphql/input/location_structure/draft/add_commands.rb +49 -49
  49. data/lib/ecoportal/api/graphql/input/location_structure/update_command.rb +27 -27
  50. data/lib/ecoportal/api/graphql/input/search_conf.rb +436 -367
  51. data/lib/ecoportal/api/graphql/interface/location_structure/command.rb +30 -30
  52. data/lib/ecoportal/api/graphql/logic/input.rb +26 -26
  53. data/lib/ecoportal/api/graphql_version.rb +1 -1
  54. metadata +20 -1
@@ -0,0 +1,74 @@
1
+ ---
2
+ schema_version: "1.1"
3
+ repo: "ecoportal-api-graphql"
4
+ doc: conventions
5
+ last_generated: "2026-07-09"
6
+ source_head: "3f7b877"
7
+ review_status: draft
8
+ ---
9
+
10
+ # Conventions -- ecoportal-api-graphql
11
+
12
+ **Source of truth:** `.rubocop.yml` (repo root) and `CLAUDE.md`. There is no `ai-discovery`
13
+ `conventions.md` in this repo; the below is composed from `.rubocop.yml`, `CLAUDE.md`, and observed
14
+ git history, not re-derived from code.
15
+
16
+ ## Code style
17
+
18
+ - Indentation: 2 spaces (Ruby default; no override in `.rubocop.yml`).
19
+ - Quotes: not enforced -- `Style/StringLiterals` is disabled, so single and double quotes are both
20
+ accepted.
21
+ - Line length: unlimited -- `Layout/LineLength` is disabled.
22
+ - Frozen string literal comment: not required (`Style/FrozenStringLiteralComment` disabled).
23
+ - Hash alignment: table style for both colon and hash-rocket (`Layout/HashAlignment`).
24
+ - Dot position: trailing (`Layout/DotPosition`).
25
+ - Alias: prefer `alias_method` (`Style/Alias`).
26
+ - Notable relaxed metrics: `ClassLength` 350, `ModuleLength` 400, `MethodLength` 100,
27
+ `AbcSize` 30, `CyclomaticComplexity`/`PerceivedComplexity` 30, `ParameterLists` 5.
28
+ - Naming exceptions: camelCase method/variable names are allowed where they mirror GraphQL/Relay
29
+ schema fields verbatim (`Naming/MethodName` disabled; `clientMutationId` allow-listed). This is
30
+ intentional -- the client mirrors the schema.
31
+ - Rubocop compliance is required for all generated Ruby: run `bundle exec rubocop <file>` to verify.
32
+
33
+ ## Branch naming
34
+
35
+ Type-prefixed, slash-separated. Observed prefixes in the branch list and history:
36
+ `feat/<slug>`, `fix/<slug>`, `docs/<slug>`, `chore/<slug>`, and longer-lived `feature/<slug>`
37
+ branches for multi-phase work. Note: `pages` is a long-running primary development branch that
38
+ predates the prefix convention.
39
+
40
+ ## Commit message style
41
+
42
+ Conventional Commits: `type(scope): message`. Observed types include `feat`, `fix`, `docs`,
43
+ `chore`, and `merge`. Scopes are area-based, e.g. `feat(diff/builder):`, `docs(worklog):`,
44
+ `chore(release):`, `docs(template-automation):`. Release commits follow
45
+ `chore(release): vX.Y.Z ...`.
46
+
47
+ ## Test conventions
48
+
49
+ - Runner: RSpec (`bundle exec rspec`).
50
+ - Placement: spec files mirror the `lib/` structure under `spec/` (e.g.
51
+ `spec/ecoportal/api/graphql/input/search_conf_spec.rb`).
52
+ - Live tests: tagged `--tag live`; `.env` is loaded via `dotenv` in `spec_helper.rb`
53
+ (needs `ANTHROPIC_API_KEY` for live AI tests).
54
+ - Manual integration scripts live under `tests/` (separate from the RSpec suite).
55
+ - Coverage is known to be sparse in subdirectories (see `.ai-assistance/code/spec_coverage.md`).
56
+
57
+ ## Project-specific rules
58
+
59
+ From `CLAUDE.md`:
60
+
61
+ - Namespace: `Ecoportal::API::GraphQL` (capital G, Q, L); file paths use lowercase `graphql/`.
62
+ - File/class mirroring: file path mirrors the class namespace exactly.
63
+ - Code-spec docs: for every area analysed, a corresponding `.ai-assistance/code/<area>.md` should
64
+ exist or be created/updated.
65
+ - No silent breaking changes: any change to the gem's public interface must be noted in the active
66
+ project's DECISIONS log and confirmed with the developer. Backwards compatibility with
67
+ `eco-helpers` must be preserved unless explicitly broken.
68
+ - Gemini responses must be verified against actual code before applying.
69
+ - Commit authorship: developer only by default; do not add `Co-Authored-By: Claude ...` unless the
70
+ developer explicitly requests it.
71
+ - Verified Platform Knowledge: consult `.ai-assistance/code/ecoPortal_architecture/` before
72
+ implementing platform logic; record newly confirmed platform facts there with evidence (ADR-012).
73
+ - Working-tree safety: follow `.ai-assistance/conventions/code-working-tree-protocol.md` (bridge
74
+ LOCK, commit overlapping unstaged changes as `wip:` first) before modifying files.
@@ -0,0 +1,65 @@
1
+ ---
2
+ schema_version: "1.1"
3
+ repo: "ecoportal-api-graphql"
4
+ doc: integrations
5
+ last_generated: "2026-07-09"
6
+ source_head: "3f7b877"
7
+ review_status: draft
8
+ ---
9
+
10
+ # Integrations -- ecoportal-api-graphql
11
+
12
+ **Purpose:** the ties this project has to other systems and repos. This is the section the central
13
+ hub uses to trace inter-project dependencies and surface reuse (ADR-015 Section 5). It records, per
14
+ tie, the DATA that flows and the PERMISSIONS required -- feeding the compliance (vendor/PII) and the
15
+ cross-project-permissions questions. Detailed data-handling lives in `COMPLIANCE.md`.
16
+
17
+ ## External services
18
+
19
+ | Service | Purpose | Data sent (class + PII?) | Auth / permissions (scopes) |
20
+ |---|---|---|---|
21
+ | ecoPortal GraphQL API | The API this gem is a client for -- reads/writes pages, templates, location structures, contractor entities, actions, organizations. | Customer data + PII: page records can contain personal data. Also template/org-config data (non-PII). The gem is a full-access client by capability; the active template-automation work restricts itself to templates/org-config only by SERVICE-ACCOUNT grant. | OAuth via `Common::GraphQL::AuthService`, scoped by `org_id`; per-environment host (e.g. live.ecoportal.com). `no_schema: true` (no introspection). Credential scope is the load-bearing control -- see COMPLIANCE.md. |
22
+ | ecoPortal REST API (v2) | Underlying REST infrastructure the GraphQL layer builds on and stays compatible with via the `Compat` layer. | Same classes as above (indirect, via `ecoportal-api-v2`). | Same OAuth / org-scoped runtime credentials; provided through the upstream `ecoportal-api-v2` gem. |
23
+
24
+ ## Upstream dependencies (repos we depend on)
25
+
26
+ | Repo / package | What we use it for | Permission/scope required (if any) |
27
+ |---|---|---|
28
+ | `ecoportal-api` | REST API base: auth, org context, base models, and the `Ecoportal::API::Common` namespace this gem extends. Team-managed. | None beyond the runtime ecoPortal API credentials (email/pass/org_id/host) passed at instantiation. |
29
+ | `ecoportal-api-v2` | REST API v2 layer (Page, Register, etc.); required by the entry point. Team-managed. Being retired over time. | Same runtime ecoPortal API credentials. |
30
+ | `graphlient` | Friendly GraphQL DSL/client wrapper; `Common::GraphQL::Client` inherits from `Graphlient::Client`. Active fork owned by the team (upstream: `ashkan18/graphlient`). | None (library dependency). |
31
+ | `graphql-client` | Low-level GraphQL HTTP + parsing, pulled in transitively via graphlient. Fork for upstream contribution only (upstream: `github-community-projects/graphql-client`); not team-maintained. | None (library dependency). |
32
+ | `graphql` (graphql-ruby) | Schema definition/execution engine (`rmosolgo/graphql-ruby`); external, read-only reference. Used server-side by ecoPortal; client-side usage here is indirect. | None (library dependency). |
33
+
34
+ ## Downstream consumers (who depends on us)
35
+
36
+ - `eco-helpers` -- the primary consumer; an integration-script framework for the ecoPortal
37
+ Integrations Team. It requires this gem (`ecoportal-api-graphql ~> 1.3, >= 1.3.4`) and relies on
38
+ the `Compat` layer to treat `graphql` as a drop-in for the older `apiv2` interface. Backwards
39
+ compatibility with `eco-helpers` must be preserved unless explicitly broken.
40
+ - `ecoportal-qa` -- consumes the gem to verify template deploys (the "verify" step of the template
41
+ build-and-maintenance pipeline; a `DryRunClient` and `Publisher` were built there). The
42
+ template-automation project aims to tighten `ecoportal-qa` to consume the gem's page-model.
43
+
44
+ ## Key package dependencies
45
+
46
+ From `ecoportal-api-graphql.gemspec` (runtime):
47
+
48
+ - `ecoportal-api` `~> 0.10, >= 0.10.16`
49
+ - `ecoportal-api-v2` `~> 3.3, >= 3.3.3`
50
+ - `graphlient` `>= 0.8.0, < 0.9`
51
+
52
+ Development: `rspec`, `rubocop` (+ `rubocop-rake`), `rake`, `pry`, `yard`, `redcarpet`.
53
+ Required Ruby: `>= 3.2.2`.
54
+
55
+ ## Feature-request-not-rebuild note
56
+
57
+ - The template build-and-maintenance capability is developed here in the gem (mechanics: read
58
+ model, command vocabulary, BUILD emitter, diff, apply, pairing engine + ledger). Orchestration
59
+ (interactive assisted-resolution UX, session flows) belongs in `eco-helpers`, and verification in
60
+ `ecoportal-qa`. Before building template/diff/deploy mechanics elsewhere, raise a feature request
61
+ against this gem rather than duplicating the emission layer.
62
+ - The active template automation is a concrete consumer of the ep-ai-standards
63
+ `security/ai-service-account-scope` standard: it must authenticate as a dedicated per-org SERVICE
64
+ ACCOUNT scoped to templates/org-config only, with page records (customer data + PII) structurally
65
+ out of scope by credential grant. See `.ai-assistance/projects/template-automatic-build-maintenance/INTENT.md`.
@@ -0,0 +1,76 @@
1
+ ---
2
+ schema_version: "1.1"
3
+ repo: "ecoportal-api-graphql"
4
+ doc: operations
5
+ last_generated: "2026-07-09"
6
+ source_head: "3f7b877"
7
+ review_status: draft
8
+ ---
9
+
10
+ # Operations -- ecoportal-api-graphql
11
+
12
+ **Purpose:** the infrastructure / exposure / value surface for DevOps and Engineering. It lets ROVO answer
13
+ "what infrastructure is involved, is it behind Cloudflare, what governs its flows, and is it worth it?"
14
+ Same trust rule as COMPLIANCE.md: separate EVIDENCE from INTENT; audit answers use `reviewed` docs only.
15
+
16
+ > This document is DRAFT and composed from the repo's own context. It is a client LIBRARY (a gem): it has
17
+ > no infrastructure or public exposure of its own. Value/KPI figures below are unmeasured placeholders for
18
+ > the repo owner to fill; do not cite them as measured until reviewed.
19
+
20
+ ## Infrastructure inventory
21
+
22
+ This project is a Ruby gem distributed as source/package -- it runs INSIDE whatever process requires it
23
+ (e.g. an `eco-helpers` integration script). It owns no compute, storage, or queue of its own.
24
+
25
+ | Component | Type (compute/store/queue/...) | Where hosted | Notes |
26
+ |---|---|---|---|
27
+ | The gem itself | library (no runtime infra) | Consumer's process / developer machine / CI | No servers, no data stores; loaded via Bundler into a host process. |
28
+ | ecoPortal GraphQL API | external service (dependency) | ecoPortal platform, per-environment host (e.g. live.ecoportal.com) | The gem is a CLIENT of this; the API's infrastructure is owned by the platform, not this repo. |
29
+ | RubyGems / Bundler | package distribution | RubyGems (or team gem source) | Distribution channel for the gem. |
30
+
31
+ ## Public exposure
32
+
33
+ **Nothing in this repo is publicly exposed.** It is a client library with no listening endpoint, no
34
+ domain, and no inbound surface. It makes OUTBOUND authenticated calls to the ecoPortal GraphQL API; the
35
+ public-exposure and Cloudflare/WAF posture of that API belongs to the ecoPortal platform's own OPERATIONS
36
+ doc, not to this gem.
37
+
38
+ | Public domain / endpoint | Behind Cloudflare? | Security rules governing the flow |
39
+ |---|---|---|
40
+ | (none -- library, no inbound surface) | N/A | Outbound only: OAuth-authenticated, `org_id`-scoped calls to the ecoPortal GraphQL API over HTTPS. |
41
+
42
+ ## DevOps audit runbook
43
+
44
+ How to check/verify this project autonomously:
45
+
46
+ - **Build / install:** `bundle install`; gem spec is `ecoportal-api-graphql.gemspec`; version constant
47
+ `Ecoportal::API::GRAPQL_VERSION`.
48
+ - **Tests:** `bundle exec rspec` for the unit suite; `bundle exec rspec --tag live` for live-API/AI tests
49
+ (requires `.env` with `ANTHROPIC_API_KEY` and ecoPortal credentials, loaded via dotenv).
50
+ - **Lint:** `bundle exec rubocop <file>` -- rubocop compliance is required for all generated Ruby
51
+ (config in `.rubocop.yml`).
52
+ - **CI:** no CI config file was detected at the repo root by the scanner (`ci_files: []`). Human to
53
+ confirm whether CI runs elsewhere (e.g. a GitLab CI defined outside the root) or is absent.
54
+ - **Version / release check:** `CHANGELOG.md` is authoritative; releases follow
55
+ `chore(release): vX.Y.Z`. Recent releases raised the `ecoportal-api-v2` floor to fix version-drift
56
+ crashes -- verify the dependency floors in the gemspec match the CHANGELOG.
57
+ - **Deeper docs:** `.ai-assistance/code/` (code-specs, dependency map, diff/build engine, schema
58
+ analysis) is the detailed runbook for engineers; `.ai-assistance/code/ecoPortal_architecture/` is the
59
+ verified platform knowledge base.
60
+
61
+ ## Value & KPIs
62
+
63
+ No usage KPIs are instrumented in this repo today. The value narrative below is qualitative /
64
+ estimated; the repo owner should replace estimates with measured figures (or a dashboard link) before
65
+ these are treated as evidence.
66
+
67
+ | Metric | Value (measured/estimated) | Source / dashboard |
68
+ |---|---|---|
69
+ | Templates targeted for programmatic build/maintenance | ~300+ (estimated, project scope) | `.ai-assistance/projects/template-automatic-build-maintenance/INTENT.md` |
70
+ | Hours saved / delivery-speed gain | Not measured | -- (owner to instrument) |
71
+ | Active monitoring | None in-repo; staleness of these self-docs is detectable via `source_head` vs git head | `self-docs-index.json` |
72
+ | Cost-vs-return | Not measured | -- (owner to instrument) |
73
+
74
+ **Coverage-on-neglect:** these self-docs carry a `source_head` and a per-doc `content_hash` in
75
+ `self-docs-index.json`, so the hub and `project-review` can flag them stale rather than silently trusting
76
+ them.
@@ -0,0 +1,64 @@
1
+ ---
2
+ schema_version: "1.1"
3
+ repo: "ecoportal-api-graphql"
4
+ doc: overview
5
+ last_generated: "2026-07-09"
6
+ source_head: "3f7b877"
7
+ review_status: draft # draft | reviewed (only a human sets 'reviewed')
8
+ ---
9
+
10
+ # Overview -- ecoportal-api-graphql
11
+
12
+ ## What this project is
13
+
14
+ `ecoportal-api-graphql` is a Ruby gem that provides a GraphQL client layer for the ecoPortal
15
+ GraphQL API. It wraps `graphlient` (which itself wraps `graphql-client`) and builds a structured
16
+ layer of models, queries, mutations, fragments, inputs, payloads, and builders on top of it. It
17
+ sits between the upstream ecoPortal REST API gems and downstream consumer code, exposing a
18
+ developer-facing facade for reading and writing ecoPortal domain objects (pages, templates,
19
+ location structures, contractor entities, actions, and organizations).
20
+
21
+ ## Who it serves
22
+
23
+ Team members -- specifically the ecoPortal Integrations Team and internal script authors. The gem
24
+ is a developer-facing library, not a customer-facing product; its primary consumer is the
25
+ `eco-helpers` integration-script framework. Because it can read and write live customer data
26
+ (page records) through the API, AI caution levels are elevated: the active template-automation
27
+ work is deliberately scoped to a service account covering templates/org-config only, keeping page
28
+ records (customer data + PII) structurally out of scope.
29
+
30
+ ## Current priority
31
+
32
+ Template Automatic Build and Maintenance (the #1-priority project). This merges the former
33
+ `template-diff-deploy` and `template-maintenance` efforts into one lifecycle: build/maintain 300+
34
+ templates programmatically (a CSV-to-templates pipeline, deadline approximately September 2026)
35
+ and make UAT-to-PROD change replication smooth via a diff/pairing/deploy/verify pipeline. Both
36
+ halves share one emission layer (an ordered `WorkflowCommand` batch with `placeholderId`
37
+ threading).
38
+
39
+ ## At a glance
40
+
41
+ - Repo type: ruby-gem
42
+ - Primary language / runtime: Ruby (>= 3.2.2)
43
+ - Entry points: `require 'ecoportal/api-graphql'` -> `lib/ecoportal/api-graphql.rb` ->
44
+ `Ecoportal::API::GraphQL` (`lib/ecoportal/api/graphql.rb`)
45
+
46
+ ## Discovery & access
47
+
48
+ Access model: **on-request, developer-scoped** -- this is a Ruby gem, not a self-serve product. It
49
+ reaches its users (the ecoPortal Integrations Team and internal script authors) by being declared as
50
+ a dependency in a consuming project's Gemfile/gemspec (e.g. `eco-helpers ~> 1.3, >= 1.3.4`), not by
51
+ a public listing or an end-user-facing install. Developers learn it exists through the team's
52
+ integration-gem stack documentation (`.ai-assistance/code/ecoPortal_architecture/11_integration_gems.md`),
53
+ the repo README, and this self-docs set once mirrored to the EP Projects Register. There is no
54
+ customer-facing discovery surface: end customers never interact with the gem directly; they see only
55
+ the ecoPortal platform it talks to.
56
+
57
+ ## Related self-docs
58
+
59
+ - Architecture: `ARCHITECTURE.md`
60
+ - Conventions: `CONVENTIONS.md`
61
+ - Integrations: `INTEGRATIONS.md`
62
+ - Status: `STATUS.md`
63
+ - Compliance: `COMPLIANCE.md`
64
+ - Operations: `OPERATIONS.md`
@@ -0,0 +1,73 @@
1
+ ---
2
+ schema_version: "1.1"
3
+ repo: "ecoportal-api-graphql"
4
+ doc: status
5
+ last_generated: "2026-07-09"
6
+ source_head: "3f7b877"
7
+ review_status: draft
8
+ ---
9
+
10
+ # Status -- ecoportal-api-graphql
11
+
12
+ **Note:** this is the most time-sensitive self-doc. Refresh it at cycle-end and after structural
13
+ changes. Staleness is detectable via `source_head` vs the current git head.
14
+
15
+ ## Active work
16
+
17
+ Hot paths from the scanner (`lib`, `.ai-assistance`, `spec`, `docs`) plus the active project
18
+ intent. The #1-priority project is Template Automatic Build and Maintenance (see
19
+ `.ai-assistance/projects/template-automatic-build-maintenance/INTENT.md`), which merges the former
20
+ `template-diff-deploy` and `template-maintenance` projects into one lifecycle sharing a single
21
+ `WorkflowCommand` emission layer:
22
+
23
+ - BUILD: build/maintain 300+ templates programmatically (CSV-to-templates pipeline, deadline
24
+ approximately September 2026) via a declarative spec -> `Builder::TemplateBuilder` -> ordered
25
+ command batch -> apply -> verify. Emitter is ready; live characterization is pending sandbox
26
+ service-account credentials.
27
+ - MAINTAIN / DIFF-DEPLOY: UAT-to-PROD change replication -- detect (diff) -> review -> deploy
28
+ (delta commands) -> verify -> monitor. Self-version diff, the pairing engine + ledger, diff
29
+ modalities/`Diff::Strategy`, the cross-object diff path, and `Change`-to-`WorkflowCommand`
30
+ synthesis are done; the interactive assisted-pairing UX (in `eco-helpers`) is pending.
31
+ - Recent fragment-convention work: Action/ContractorEntity mutations migrated to the spread
32
+ convention; the query validator now covers mutations.
33
+
34
+ ## Migration state (if any)
35
+
36
+ - ooze/pages GraphQL-native migration and the api-v2-to-graphql migration are ongoing themes (see
37
+ `.ai-assistance/projects/ooze-graphql-native-migration/` and `.../api-v2-to-graphql-migration/`).
38
+ `ecoportal-api-v2` is being retired over time; the `Compat` layer preserves the v2 interface for
39
+ `eco-helpers` during the transition.
40
+ - Recent releases addressed stale-release drift: v1.3.11 raised the `ecoportal-api-v2` floor to
41
+ `>= 3.3.3` to fix a Ruby-3.x cascade after three live crashes were traced to version drift.
42
+
43
+ ## Known risks
44
+
45
+ - Live customer data exposure: the gem can read/write page records (PII). The template automation
46
+ is the mitigation lever -- it MUST run under a service account scoped to templates/org-config
47
+ only, enforced by credential grant, not by instruction (ep-ai-standards
48
+ `security/ai-service-account-scope`). Provisioning that concrete grant is now this repo's work,
49
+ not a platform blocker.
50
+ - Backwards compatibility with `eco-helpers` is a hard constraint; public-interface changes must be
51
+ logged in the active project's DECISIONS log and confirmed with the developer.
52
+ - `no_schema: true` means queries are not validated against a schema at build time -- a query
53
+ validator (now covering mutations) is the compensating control.
54
+ - Spec coverage is sparse in subdirectories (`.ai-assistance/code/spec_coverage.md`).
55
+
56
+ ## Open questions
57
+
58
+ - No CI config was detected at the repo root; whether CI runs elsewhere or is absent needs human
59
+ confirmation.
60
+ - The cross-object equivalence-matching (pairing) problem has no stable identity across independent
61
+ Mongo objects; it depends partly on Product's forthcoming template-entity-id, which this gem
62
+ bridges and feeds but does not own.
63
+ - Workflow-config-per-stage diff is out of scope until the `PagesWorkflow.stages` read model is
64
+ completed.
65
+
66
+ ## Recent changes
67
+
68
+ Upgraded the self-docs set to schema 1.1 (audit/compliance surface): added `COMPLIANCE.md` and
69
+ `OPERATIONS.md`, enriched `INTEGRATIONS.md` (data class + PII + permissions per tie) and `OVERVIEW.md`
70
+ (Discovery & access), and bumped all docs to `source_head` `3f7b877`. Everything remains
71
+ `review_status: draft` -- a human must set `reviewed` before any audit use. Prior state: first
72
+ generation at git head `2abd6fc` (EP Projects Register pilot). The machine-readable delta is in
73
+ `CHANGES.jsonl`.
@@ -0,0 +1,51 @@
1
+ {
2
+ "schema_version": "1.1",
3
+ "generated_at": "2026-07-09T07:08:00Z",
4
+ "repo_name": "ecoportal-api-graphql",
5
+ "repo_type": "ruby-gem",
6
+ "head": "3f7b877",
7
+ "docs": [
8
+ {
9
+ "file": "docs/self-docs/OVERVIEW.md",
10
+ "purpose": "What the project is, who it serves, current priority, discovery & access",
11
+ "exists": true,
12
+ "content_hash": "c403012498ab9247"
13
+ },
14
+ {
15
+ "file": "docs/self-docs/ARCHITECTURE.md",
16
+ "purpose": "Top-level structure, key components, how they fit",
17
+ "exists": true,
18
+ "content_hash": "ad05f25b95b49c00"
19
+ },
20
+ {
21
+ "file": "docs/self-docs/CONVENTIONS.md",
22
+ "purpose": "Coding style, branch naming, commit style, test conventions",
23
+ "exists": true,
24
+ "content_hash": "1649159eb799a7b8"
25
+ },
26
+ {
27
+ "file": "docs/self-docs/INTEGRATIONS.md",
28
+ "purpose": "External services + data + permissions, upstream/downstream repos",
29
+ "exists": true,
30
+ "content_hash": "d271ac76361e4638"
31
+ },
32
+ {
33
+ "file": "docs/self-docs/STATUS.md",
34
+ "purpose": "Active work, migration state, known risks, open questions",
35
+ "exists": true,
36
+ "content_hash": "1acf51a3e7822dfb"
37
+ },
38
+ {
39
+ "file": "docs/self-docs/COMPLIANCE.md",
40
+ "purpose": "ISO-27001/audit, data classes + PII, vendors, AI content, leak controls",
41
+ "exists": true,
42
+ "content_hash": "1e72c2356b4e3579"
43
+ },
44
+ {
45
+ "file": "docs/self-docs/OPERATIONS.md",
46
+ "purpose": "Infrastructure, public exposure + Cloudflare, DevOps audit, usage KPIs",
47
+ "exists": true,
48
+ "content_hash": "878b50d02339acb7"
49
+ }
50
+ ]
51
+ }
data/docs/worklog.md CHANGED
@@ -8,26 +8,21 @@ This file tracks cross-project session state and the overall repo status.
8
8
 
9
9
  ---
10
10
 
11
- ## ▶ SESSION 2026-07-06RELEASED the fixed stack; act-gov tagtree + toocs live-green
12
-
13
- The 2026-07-05 crash-fixing arc shipped. **All three live-verified green** on act-gov (direct
14
- `-no-email` runs): **tagtree-update** (created draft 8 insert / 3 archive → published, no customer
15
- email) and **toocs-coding** (Oscar confirmed). Released, in dependency order:
16
- - **ecoportal-api-v2 `v3.3.3`** Ruby-3.x cascade block-param fix + regression spec.
17
- - **ecoportal-api-graphql `v1.3.11`** Diff build+maintenance engine; fragment-convention + Kickstand
18
- DateTime fixes; requires v2 >= 3.3.3; validate_queries now covers mutations + hard-fails on render.
19
- - **eco-helpers `v3.2.17`** native template build+maintenance + ooze-native; location fragment
20
- (`spread :LocationDraft`) + `worfklow` no-email typo fixes; requires gem >= 1.3.11 + v2 >= 3.3.3.
21
- - **multi_org_api** (`master` + `api-deprecation`) `-no-email` now forwarded through the rake
22
- wrapper + `worfklow` typo fixed (stops customer emails during rake/scheduled tests).
23
-
24
- Oscar git-pushed all repos + gem-published; **deploying via server `bundle update ecoportal-api-v2
25
- ecoportal-api-graphql eco-helpers`** (production Gemfile floors gem>=1.3.9/eco-helpers>=3.2.16, but the
26
- gemspec floors force v2>=3.3.3 + gem>=1.3.11 transitively). Systemic guard against the recurring
27
- stale-release drift: raised gemspec dependency FLOORS everywhere + extended `validate_queries.rb`.
28
-
29
- **STILL OPEN (non-blocking):** rake `notify_exception` emails the customer on task error regardless of
30
- `-no-email` — decision pending (suppress / route-to-dev / keep). See [[no-email-leak-paths]].
11
+ ## ▶ SESSION 2026-07-10OD-001 decision-support delivered to ep-ai-standards (breadcrumb)
12
+
13
+ Produced a decision-support doc mapping this repo's REAL GraphQL mutation surface onto
14
+ ep-ai-standards' operation-class ladder for OD-001 (the GraphQL gateway PROD "low-risk"
15
+ auto-approval threshold / provisional Dial A). Evidence-based from live introspection
16
+ (`.ai-assistance/tmp/20260605T101224_live_ep_graphql_schema.graphql.json` -- 190 mutations)
17
+ + code-specs + `lib/ecoportal/api/graphql/mutation/**`. Key findings: register-type axis is
18
+ real + in-schema (`Register.registerStatus: TESTING|LIVE`, `base/register.rb:7`); org-type
19
+ (sandpit/uat/demo/PROD) is NOT a schema field (infra/credential-level, `base/organization.rb`
20
+ exposes only id/name/companyName/logoUrl); several mutations do not map cleanly (payload-hidden
21
+ deletions in `updatePage`, bulk/cascade, cross-env UAT->PROD deploy, egress/email/credential
22
+ mints). Delivered to ep-ai-standards' bridge inbox as
23
+ `ecoportal-api-graphql-od001-mutation-mapping.md` (STATUS: PENDING) -- a PROPOSAL for the graphql
24
+ team + Oscar to validate via an ep-ai-standards MR. NO code changed in this repo. Does not change
25
+ OD-001's ruling. (OD-007 breadcrumb convention.)
31
26
 
32
27
  ---
33
28
 
@@ -29,6 +29,8 @@ module Ecoportal
29
29
 
30
30
  puts "Configuring GraphQL Client onto '#{url}'"
31
31
 
32
+ pp email
33
+
32
34
  super(
33
35
  url,
34
36
  headers: {