From 2474f52dd733ab3a70574af3dadbfcf6612237b3 Mon Sep 17 00:00:00 2001 From: Sumer Johal Date: Wed, 26 Aug 2026 20:59:34 -0700 Subject: [PATCH] Adopt EUPL-1.2: add missing LICENSE, SPDX headers, fix prose declarations Companion to agstack/ar2#17 and agstack/ar2-hub#8. This repo had no LICENSE file at all while GOVERNANCE.md and README.md declared Apache 2.0 in prose -- unlicensed by default, and permissive if the prose had been honored, either way contradicting the one-standard copyleft intent for the permission office (grants, revocation, audit ledger). LICENSE is the canonical EUPL-1.2 text; every tracked Python file carries the SPDX header; prose declarations corrected in the same commit; scripts/license_check.sh gates it all in CI. Co-authored-by: Cursor --- .audit/validate_fatfd.py | 4 + .github/workflows/ci.yml | 8 + GOVERNANCE.md | 2 +- LICENSE | 287 ++++++++++++++++++ README.md | 6 +- archive/find_function.py | 4 + archive/fix_all_tap_paths.py | 4 + archive/fix_function_name.py | 4 + archive/fix_tap_demo.py | 4 + archive/fix_temporal_call.py | 4 + archive/rewrite_function.py | 4 + dpi-demo/demo_client.py | 4 + dpi-demo/gen_env.py | 4 + implementation/meal.py | 4 + implementation/tap_adapter_base.py | 4 + implementation/tap_adapters.py | 4 + later/app.py | 4 + later/app/__init__.py | 4 + later/app/models/__init__.py | 4 + later/app/routes/__init__.py | 4 + later/app/routes/chat.py | 4 + later/app/routes/graph.py | 4 + later/app/routes/health.py | 4 + later/app/routes/intake.py | 4 + later/app/routes/packets.py | 4 + later/app/routes/shares.py | 4 + later/app/schemas/__init__.py | 4 + later/app/services/__init__.py | 4 + later/app/services/asset_registry.py | 4 + later/app/services/packet_service.py | 4 + later/app/services/user_registry.py | 4 + later/app/utils/__init__.py | 4 + later/app/utils/packet_utils.py | 4 + later/config.py | 4 + later/migrations/env.py | 4 + migrate_day1.py | 4 + scripts/license_check.sh | 31 ++ services/demo/end_to_end_demo.py | 4 + services/export_openapi.py | 4 + services/pancake_services/__init__.py | 4 + services/pancake_services/common/__init__.py | 3 + services/pancake_services/common/config.py | 4 + services/pancake_services/common/db.py | 4 + services/pancake_services/grants/__init__.py | 3 + services/pancake_services/grants/app.py | 4 + services/pancake_services/grants/auth.py | 4 + services/pancake_services/grants/issuer.py | 4 + services/pancake_services/grants/mealstore.py | 4 + services/pancake_services/grants/merkle.py | 4 + services/pancake_services/grants/models.py | 4 + .../grants/routers/__init__.py | 3 + .../pancake_services/grants/routers/audit.py | 4 + .../pancake_services/grants/routers/bites.py | 4 + .../grants/routers/fieldlists.py | 4 + .../pancake_services/grants/routers/grants.py | 4 + services/pancake_services/grants/schemas.py | 4 + services/pancake_services/grants/sdjwt.py | 4 + .../pancake_services/grants/statuslist.py | 4 + .../grants/statuslist_service.py | 4 + .../grants/testkit/__init__.py | 3 + .../grants/testkit/fake_ar2.py | 4 + .../grants/testkit/mint_test_credentials.py | 4 + services/pancake_services/store/__init__.py | 3 + services/pancake_services/store/bites.py | 4 + services/pancake_services/tap/__init__.py | 3 + services/pancake_services/tap/adapter_base.py | 4 + .../pancake_services/tap/adapters/__init__.py | 4 + .../tap/adapters/seed_weather.py | 4 + .../tap/adapters/terrapipe_weather.py | 4 + .../tap/adapters/weather_common.py | 4 + services/pancake_services/tap/config.py | 4 + services/pancake_services/tap/runtime.py | 4 + services/pancake_services/tap/worker.py | 4 + services/tests/conftest.py | 4 + services/tests/test_auth.py | 4 + services/tests/test_bite_store.py | 4 + services/tests/test_bites_grant_gate.py | 4 + services/tests/test_fieldlists.py | 4 + services/tests/test_grants.py | 4 + services/tests/test_meal_audit.py | 4 + services/tests/test_merkle.py | 4 + services/tests/test_sdjwt.py | 4 + services/tests/test_statuslist.py | 4 + services/tests/test_tap_runtime.py | 4 + services/tests/test_tap_weather.py | 4 + services/tests/test_testkit.py | 4 + tests/__init__.py | 4 + tests/conftest.py | 4 + tests/functional/test_intake.py | 4 + tests/unit/test_meal_legacy.py | 4 + tests/unit/test_packet_utils.py | 4 + 91 files changed, 669 insertions(+), 3 deletions(-) create mode 100644 LICENSE create mode 100755 scripts/license_check.sh diff --git a/.audit/validate_fatfd.py b/.audit/validate_fatfd.py index 3c8ee8a..a49fdff 100644 --- a/.audit/validate_fatfd.py +++ b/.audit/validate_fatfd.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """FATFD integrity validator for Pancake. Checks: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 652d4fa..ca936a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,14 @@ name: Pancake CI on: [push, pull_request] jobs: + license: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: License posture (canonical EUPL-1.2 + SPDX headers) + run: bash scripts/license_check.sh + lint: runs-on: ubuntu-latest steps: diff --git a/GOVERNANCE.md b/GOVERNANCE.md index bb0d47f..b778c77 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -2,7 +2,7 @@ **Project**: BITE/PANCAKE/TAP/SIRUP/SIP **Organization**: AgStack -**License**: Apache 2.0 +**License**: EUPL-1.2 (code) | CC BY 4.0 (documentation) **Version**: 1.0 **Last Updated**: November 2024 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4153cd3 --- /dev/null +++ b/LICENSE @@ -0,0 +1,287 @@ + EUROPEAN UNION PUBLIC LICENCE v. 1.2 + EUPL © the European Union 2007, 2016 + +This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined +below) which is provided under the terms of this Licence. Any use of the Work, +other than as authorised under this Licence is prohibited (to the extent such +use is covered by a right of the copyright holder of the Work). + +The Work is provided under the terms of this Licence when the Licensor (as +defined below) has placed the following notice immediately following the +copyright notice for the Work: + + Licensed under the EUPL + +or has expressed by any other means his willingness to license under the EUPL. + +1. Definitions + +In this Licence, the following terms have the following meaning: + +- ‘The Licence’: this Licence. + +- ‘The Original Work’: the work or software distributed or communicated by the + Licensor under this Licence, available as Source Code and also as Executable + Code as the case may be. + +- ‘Derivative Works’: the works or software that could be created by the + Licensee, based upon the Original Work or modifications thereof. This Licence + does not define the extent of modification or dependence on the Original Work + required in order to classify a work as a Derivative Work; this extent is + determined by copyright law applicable in the country mentioned in Article 15. + +- ‘The Work’: the Original Work or its Derivative Works. + +- ‘The Source Code’: the human-readable form of the Work which is the most + convenient for people to study and modify. + +- ‘The Executable Code’: any code which has generally been compiled and which is + meant to be interpreted by a computer as a program. + +- ‘The Licensor’: the natural or legal person that distributes or communicates + the Work under the Licence. + +- ‘Contributor(s)’: any natural or legal person who modifies the Work under the + Licence, or otherwise contributes to the creation of a Derivative Work. + +- ‘The Licensee’ or ‘You’: any natural or legal person who makes any usage of + the Work under the terms of the Licence. + +- ‘Distribution’ or ‘Communication’: any act of selling, giving, lending, + renting, distributing, communicating, transmitting, or otherwise making + available, online or offline, copies of the Work or providing access to its + essential functionalities at the disposal of any other natural or legal + person. + +2. Scope of the rights granted by the Licence + +The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, +sublicensable licence to do the following, for the duration of copyright vested +in the Original Work: + +- use the Work in any circumstance and for all usage, +- reproduce the Work, +- modify the Work, and make Derivative Works based upon the Work, +- communicate to the public, including the right to make available or display + the Work or copies thereof to the public and perform publicly, as the case may + be, the Work, +- distribute the Work or copies thereof, +- lend and rent the Work or copies thereof, +- sublicense rights in the Work or copies thereof. + +Those rights can be exercised on any media, supports and formats, whether now +known or later invented, as far as the applicable law permits so. + +In the countries where moral rights apply, the Licensor waives his right to +exercise his moral right to the extent allowed by law in order to make effective +the licence of the economic rights here above listed. + +The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to +any patents held by the Licensor, to the extent necessary to make use of the +rights granted on the Work under this Licence. + +3. Communication of the Source Code + +The Licensor may provide the Work either in its Source Code form, or as +Executable Code. If the Work is provided as Executable Code, the Licensor +provides in addition a machine-readable copy of the Source Code of the Work +along with each copy of the Work that the Licensor distributes or indicates, in +a notice following the copyright notice attached to the Work, a repository where +the Source Code is easily and freely accessible for as long as the Licensor +continues to distribute or communicate the Work. + +4. Limitations on copyright + +Nothing in this Licence is intended to deprive the Licensee of the benefits from +any exception or limitation to the exclusive rights of the rights owners in the +Work, of the exhaustion of those rights or of other applicable limitations +thereto. + +5. Obligations of the Licensee + +The grant of the rights mentioned above is subject to some restrictions and +obligations imposed on the Licensee. Those obligations are the following: + +Attribution right: The Licensee shall keep intact all copyright, patent or +trademarks notices and all notices that refer to the Licence and to the +disclaimer of warranties. The Licensee must include a copy of such notices and a +copy of the Licence with every copy of the Work he/she distributes or +communicates. The Licensee must cause any Derivative Work to carry prominent +notices stating that the Work has been modified and the date of modification. + +Copyleft clause: If the Licensee distributes or communicates copies of the +Original Works or Derivative Works, this Distribution or Communication will be +done under the terms of this Licence or of a later version of this Licence +unless the Original Work is expressly distributed only under this version of the +Licence — for example by communicating ‘EUPL v. 1.2 only’. The Licensee +(becoming Licensor) cannot offer or impose any additional terms or conditions on +the Work or Derivative Work that alter or restrict the terms of the Licence. + +Compatibility clause: If the Licensee Distributes or Communicates Derivative +Works or copies thereof based upon both the Work and another work licensed under +a Compatible Licence, this Distribution or Communication can be done under the +terms of this Compatible Licence. For the sake of this clause, ‘Compatible +Licence’ refers to the licences listed in the appendix attached to this Licence. +Should the Licensee's obligations under the Compatible Licence conflict with +his/her obligations under this Licence, the obligations of the Compatible +Licence shall prevail. + +Provision of Source Code: When distributing or communicating copies of the Work, +the Licensee will provide a machine-readable copy of the Source Code or indicate +a repository where this Source will be easily and freely available for as long +as the Licensee continues to distribute or communicate the Work. + +Legal Protection: This Licence does not grant permission to use the trade names, +trademarks, service marks, or names of the Licensor, except as required for +reasonable and customary use in describing the origin of the Work and +reproducing the content of the copyright notice. + +6. Chain of Authorship + +The original Licensor warrants that the copyright in the Original Work granted +hereunder is owned by him/her or licensed to him/her and that he/she has the +power and authority to grant the Licence. + +Each Contributor warrants that the copyright in the modifications he/she brings +to the Work are owned by him/her or licensed to him/her and that he/she has the +power and authority to grant the Licence. + +Each time You accept the Licence, the original Licensor and subsequent +Contributors grant You a licence to their contributions to the Work, under the +terms of this Licence. + +7. Disclaimer of Warranty + +The Work is a work in progress, which is continuously improved by numerous +Contributors. It is not a finished work and may therefore contain defects or +‘bugs’ inherent to this type of development. + +For the above reason, the Work is provided under the Licence on an ‘as is’ basis +and without warranties of any kind concerning the Work, including without +limitation merchantability, fitness for a particular purpose, absence of defects +or errors, accuracy, non-infringement of intellectual property rights other than +copyright as stated in Article 6 of this Licence. + +This disclaimer of warranty is an essential part of the Licence and a condition +for the grant of any rights to the Work. + +8. Disclaimer of Liability + +Except in the cases of wilful misconduct or damages directly caused to natural +persons, the Licensor will in no event be liable for any direct or indirect, +material or moral, damages of any kind, arising out of the Licence or of the use +of the Work, including without limitation, damages for loss of goodwill, work +stoppage, computer failure or malfunction, loss of data or any commercial +damage, even if the Licensor has been advised of the possibility of such damage. +However, the Licensor will be liable under statutory product liability laws as +far such laws apply to the Work. + +9. Additional agreements + +While distributing the Work, You may choose to conclude an additional agreement, +defining obligations or services consistent with this Licence. However, if +accepting obligations, You may act only on your own behalf and on your sole +responsibility, not on behalf of the original Licensor or any other Contributor, +and only if You agree to indemnify, defend, and hold each Contributor harmless +for any liability incurred by, or claims asserted against such Contributor by +the fact You have accepted any warranty or additional liability. + +10. Acceptance of the Licence + +The provisions of this Licence can be accepted by clicking on an icon ‘I agree’ +placed under the bottom of a window displaying the text of this Licence or by +affirming consent in any other similar way, in accordance with the rules of +applicable law. Clicking on that icon indicates your clear and irrevocable +acceptance of this Licence and all of its terms and conditions. + +Similarly, you irrevocably accept this Licence and all of its terms and +conditions by exercising any rights granted to You by Article 2 of this Licence, +such as the use of the Work, the creation by You of a Derivative Work or the +Distribution or Communication by You of the Work or copies thereof. + +11. Information to the public + +In case of any Distribution or Communication of the Work by means of electronic +communication by You (for example, by offering to download the Work from a +remote location) the distribution channel or media (for example, a website) must +at least provide to the public the information requested by the applicable law +regarding the Licensor, the Licence and the way it may be accessible, concluded, +stored and reproduced by the Licensee. + +12. Termination of the Licence + +The Licence and the rights granted hereunder will terminate automatically upon +any breach by the Licensee of the terms of the Licence. + +Such a termination will not terminate the licences of any person who has +received the Work from the Licensee under the Licence, provided such persons +remain in full compliance with the Licence. + +13. Miscellaneous + +Without prejudice of Article 9 above, the Licence represents the complete +agreement between the Parties as to the Work. + +If any provision of the Licence is invalid or unenforceable under applicable +law, this will not affect the validity or enforceability of the Licence as a +whole. Such provision will be construed or reformed so as necessary to make it +valid and enforceable. + +The European Commission may publish other linguistic versions or new versions of +this Licence or updated versions of the Appendix, so far this is required and +reasonable, without reducing the scope of the rights granted by the Licence. New +versions of the Licence will be published with a unique version number. + +All linguistic versions of this Licence, approved by the European Commission, +have identical value. Parties can take advantage of the linguistic version of +their choice. + +14. Jurisdiction + +Without prejudice to specific agreement between parties, + +- any litigation resulting from the interpretation of this License, arising + between the European Union institutions, bodies, offices or agencies, as a + Licensor, and any Licensee, will be subject to the jurisdiction of the Court + of Justice of the European Union, as laid down in article 272 of the Treaty on + the Functioning of the European Union, + +- any litigation arising between other parties and resulting from the + interpretation of this License, will be subject to the exclusive jurisdiction + of the competent court where the Licensor resides or conducts its primary + business. + +15. Applicable Law + +Without prejudice to specific agreement between parties, + +- this Licence shall be governed by the law of the European Union Member State + where the Licensor has his seat, resides or has his registered office, + +- this licence shall be governed by Belgian law if the Licensor has no seat, + residence or registered office inside a European Union Member State. + +Appendix + +‘Compatible Licences’ according to Article 5 EUPL are: + +- GNU General Public License (GPL) v. 2, v. 3 +- GNU Affero General Public License (AGPL) v. 3 +- Open Software License (OSL) v. 2.1, v. 3.0 +- Eclipse Public License (EPL) v. 1.0 +- CeCILL v. 2.0, v. 2.1 +- Mozilla Public Licence (MPL) v. 2 +- GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3 +- Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for + works other than software +- European Union Public Licence (EUPL) v. 1.1, v. 1.2 +- Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong + Reciprocity (LiLiQ-R+). + +The European Commission may update this Appendix to later versions of the above +licences without producing a new version of the EUPL, as long as they provide +the rights granted in Article 2 of this Licence and protect the covered Source +Code from exclusive appropriation. + +All other changes or additions to this Appendix require the production of a new +EUPL version. diff --git a/README.md b/README.md index a7e9c43..a283a6d 100644 --- a/README.md +++ b/README.md @@ -200,7 +200,7 @@ eudr_report = eudr_compliance.generate_eudr_report(shipment_geoid='shipment-123' - **AI/ML**: OpenAI GPT-4 (embeddings and queries), local models supported - **Blockchain**: Hyperledger Fabric (payments), Hyperledger Indy/Aries (identity) - **Languages**: Python 3.9+ -- **License**: Apache 2.0 (Code) | CC BY 4.0 (Documentation) +- **License**: EUPL-1.2 (Code) | CC BY 4.0 (Documentation) --- @@ -224,7 +224,9 @@ PANCAKE is an AgStack project under The Linux Foundation. We welcome contributio ## License -- **Code**: Apache 2.0 +- **Code**: EUPL-1.2 (European Union Public Licence — copyleft that also binds + hosted services, so modified versions must be contributed back rather than + proliferated as closed variants; see `LICENSE`) - **Documentation**: CC BY 4.0 --- diff --git a/archive/find_function.py b/archive/find_function.py index 38d6c75..24c013c 100644 --- a/archive/find_function.py +++ b/archive/find_function.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Find and completely rewrite ask_pancake_enhanced function """ diff --git a/archive/fix_all_tap_paths.py b/archive/fix_all_tap_paths.py index f115ef7..6cd3fa1 100644 --- a/archive/fix_all_tap_paths.py +++ b/archive/fix_all_tap_paths.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Fix all remaining ['data'] accesses in TAP demo """ diff --git a/archive/fix_function_name.py b/archive/fix_function_name.py index c82b064..909583b 100644 --- a/archive/fix_function_name.py +++ b/archive/fix_function_name.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Fix cosine_similarity → semantic_similarity in ask_pancake_enhanced """ diff --git a/archive/fix_tap_demo.py b/archive/fix_tap_demo.py index 50687cf..a5f6ef5 100644 --- a/archive/fix_tap_demo.py +++ b/archive/fix_tap_demo.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Fix TAP demo code to use correct BITE structure path """ diff --git a/archive/fix_temporal_call.py b/archive/fix_temporal_call.py index 62a61af..a92c6b5 100644 --- a/archive/fix_temporal_call.py +++ b/archive/fix_temporal_call.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Fix temporal_similarity call to include current timestamp """ diff --git a/archive/rewrite_function.py b/archive/rewrite_function.py index 36c171c..e9b5680 100644 --- a/archive/rewrite_function.py +++ b/archive/rewrite_function.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Completely rewrite ask_pancake_enhanced function to fix all issues """ diff --git a/dpi-demo/demo_client.py b/dpi-demo/demo_client.py index fe4c447..485a7da 100644 --- a/dpi-demo/demo_client.py +++ b/dpi-demo/demo_client.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Tiny HTTP client helpers for the PnD DPI demo notebook/scripts. Deliberately dependency-light (requests only) and forgiving: every call returns diff --git a/dpi-demo/gen_env.py b/dpi-demo/gen_env.py index 8082c3f..5791848 100644 --- a/dpi-demo/gen_env.py +++ b/dpi-demo/gen_env.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Create .env from .env.example with a freshly generated Pancake issuer key. Idempotent: does nothing if .env already exists. Kept as a separate script so diff --git a/implementation/meal.py b/implementation/meal.py index c22bbdc..1613cdb 100644 --- a/implementation/meal.py +++ b/implementation/meal.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ MEAL: Multi-User Engagement Asynchronous Ledger ================================================ diff --git a/implementation/tap_adapter_base.py b/implementation/tap_adapter_base.py index 13da7b8..8f07849 100644 --- a/implementation/tap_adapter_base.py +++ b/implementation/tap_adapter_base.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ TAP Adapter Base Classes and Factory ===================================== diff --git a/implementation/tap_adapters.py b/implementation/tap_adapters.py index 6d4742c..d4f0094 100644 --- a/implementation/tap_adapters.py +++ b/implementation/tap_adapters.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ TAP Vendor Adapters =================== diff --git a/later/app.py b/later/app.py index 124e9c3..1ea70c8 100644 --- a/later/app.py +++ b/later/app.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Pancake - Main entry point """ diff --git a/later/app/__init__.py b/later/app/__init__.py index 9daf1be..f24c995 100644 --- a/later/app/__init__.py +++ b/later/app/__init__.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Pancake Flask Application Factory """ diff --git a/later/app/models/__init__.py b/later/app/models/__init__.py index a214e23..589bd9c 100644 --- a/later/app/models/__init__.py +++ b/later/app/models/__init__.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Database Models for Pancake """ diff --git a/later/app/routes/__init__.py b/later/app/routes/__init__.py index 6b617e5..95698bd 100644 --- a/later/app/routes/__init__.py +++ b/later/app/routes/__init__.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ API Routes - Blueprints """ diff --git a/later/app/routes/chat.py b/later/app/routes/chat.py index 8736b26..da05ced 100644 --- a/later/app/routes/chat.py +++ b/later/app/routes/chat.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Chat Routes - Threads, Messages, Query """ diff --git a/later/app/routes/graph.py b/later/app/routes/graph.py index 5286004..2dee9d1 100644 --- a/later/app/routes/graph.py +++ b/later/app/routes/graph.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Graph Routes - Materialize NDJSON triples """ diff --git a/later/app/routes/health.py b/later/app/routes/health.py index ae20e28..46a0274 100644 --- a/later/app/routes/health.py +++ b/later/app/routes/health.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Health Check Endpoint """ diff --git a/later/app/routes/intake.py b/later/app/routes/intake.py index 88c2b5e..571d791 100644 --- a/later/app/routes/intake.py +++ b/later/app/routes/intake.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Intake Routes - Scouting and Chat Message Intake """ diff --git a/later/app/routes/packets.py b/later/app/routes/packets.py index 9317ce9..467fe3d 100644 --- a/later/app/routes/packets.py +++ b/later/app/routes/packets.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Packet Routes - Retrieval and Queries """ diff --git a/later/app/routes/shares.py b/later/app/routes/shares.py index a413374..92b7fc9 100644 --- a/later/app/routes/shares.py +++ b/later/app/routes/shares.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Shares Routes - Discoverability-aware sharing """ diff --git a/later/app/schemas/__init__.py b/later/app/schemas/__init__.py index bf5168b..54c6978 100644 --- a/later/app/schemas/__init__.py +++ b/later/app/schemas/__init__.py @@ -1,2 +1,6 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Schemas package""" diff --git a/later/app/services/__init__.py b/later/app/services/__init__.py index 21168fc..5af601d 100644 --- a/later/app/services/__init__.py +++ b/later/app/services/__init__.py @@ -1,2 +1,6 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Services package""" diff --git a/later/app/services/asset_registry.py b/later/app/services/asset_registry.py index a8cfe5e..334ff2a 100644 --- a/later/app/services/asset_registry.py +++ b/later/app/services/asset_registry.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Asset Registry Client - GeoID Resolution Service Integrates with https://github.com/agstack/asset-registry diff --git a/later/app/services/packet_service.py b/later/app/services/packet_service.py index ee3b0ad..ff45017 100644 --- a/later/app/services/packet_service.py +++ b/later/app/services/packet_service.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Packet Service - Business logic for packet management """ diff --git a/later/app/services/user_registry.py b/later/app/services/user_registry.py index 3a6a116..e39bf78 100644 --- a/later/app/services/user_registry.py +++ b/later/app/services/user_registry.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ User Registry Client - JWT validation, discoverability, webhooks Integrates with https://github.com/agstack/user-registry diff --git a/later/app/utils/__init__.py b/later/app/utils/__init__.py index 202d619..8c29fa2 100644 --- a/later/app/utils/__init__.py +++ b/later/app/utils/__init__.py @@ -1,2 +1,6 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Utilities package""" diff --git a/later/app/utils/packet_utils.py b/later/app/utils/packet_utils.py index 51d0780..83f29bc 100644 --- a/later/app/utils/packet_utils.py +++ b/later/app/utils/packet_utils.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Packet Utilities - Hash computation, validation, ULID generation """ diff --git a/later/config.py b/later/config.py index 97bdac8..289b41f 100644 --- a/later/config.py +++ b/later/config.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Pancake MVP - Configuration Management """ diff --git a/later/migrations/env.py b/later/migrations/env.py index 4c97092..57f1de0 100644 --- a/later/migrations/env.py +++ b/later/migrations/env.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + import logging from logging.config import fileConfig diff --git a/migrate_day1.py b/migrate_day1.py index d843d65..c9599ae 100644 --- a/migrate_day1.py +++ b/migrate_day1.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + import sqlite3 import httpx import os diff --git a/scripts/license_check.sh b/scripts/license_check.sh new file mode 100755 index 0000000..cf57611 --- /dev/null +++ b/scripts/license_check.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# Fail if the license posture regresses. +# +# Two invariants, both mechanical: +# 1. LICENSE is the canonical EUPL-1.2 English text, byte for byte. +# (Its predecessor here was a silently truncated license file that GitHub +# reported as NOASSERTION -- a hash comparison cannot fail that quietly.) +# 2. Every git-tracked Python file carries the SPDX EUPL-1.2 header. +set -euo pipefail + +# sha256 of https://joinup.ec.europa.eu/sites/default/files/custom-page/attachment/2020-03/EUPL-1.2%20EN.txt +# computed 2026-08-26 (287 lines). +want="6fc9e709ccbfe0d77fbffa2427a983282be2eb88e47b1cdb49f21a83b4d1e665" +got=$(shasum -a 256 LICENSE | cut -d' ' -f1) +if [ "$got" != "$want" ]; then + echo "FAIL: LICENSE is not the canonical EUPL-1.2 text (sha256 $got)" + exit 1 +fi + +fail=0 +while IFS= read -r f; do + if ! head -5 "$f" | grep -q "SPDX-License-Identifier: EUPL-1.2"; then + echo "FAIL: missing SPDX EUPL-1.2 header: $f" + fail=1 + fi +done < <(git ls-files '*.py') + +if [ "$fail" -eq 0 ]; then + echo "license posture OK: canonical EUPL-1.2 + headers on all tracked .py files" +fi +exit "$fail" diff --git a/services/demo/end_to_end_demo.py b/services/demo/end_to_end_demo.py index 4171dcf..5efa636 100644 --- a/services/demo/end_to_end_demo.py +++ b/services/demo/end_to_end_demo.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """End-to-end demo: the full DPI grant lifecycle, in-process. Simulates the AR hub (RS256 JWKS), then runs: diff --git a/services/export_openapi.py b/services/export_openapi.py index 5bfb9a1..25f2c71 100644 --- a/services/export_openapi.py +++ b/services/export_openapi.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Export the service's OpenAPI spec to openapi.json (grant deliverable: API catalog).""" import json import sys diff --git a/services/pancake_services/__init__.py b/services/pancake_services/__init__.py index 7bf52ae..94af91a 100644 --- a/services/pancake_services/__init__.py +++ b/services/pancake_services/__init__.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Pancake DPI services: grants (field ownership + wallet credentials), TAP runtime, BITE store.""" __version__ = "1.0.0" diff --git a/services/pancake_services/common/__init__.py b/services/pancake_services/common/__init__.py index e69de29..2b47ab2 100644 --- a/services/pancake_services/common/__init__.py +++ b/services/pancake_services/common/__init__.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. diff --git a/services/pancake_services/common/config.py b/services/pancake_services/common/config.py index 7c30dd3..d0311c9 100644 --- a/services/pancake_services/common/config.py +++ b/services/pancake_services/common/config.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Service configuration, sourced from environment variables only. No secrets are ever hardcoded or defaulted; missing security-critical diff --git a/services/pancake_services/common/db.py b/services/pancake_services/common/db.py index daad26b..9f856c5 100644 --- a/services/pancake_services/common/db.py +++ b/services/pancake_services/common/db.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """SQLAlchemy engine/session wiring. SQLite by default for development and tests; Postgres via DATABASE_URL in diff --git a/services/pancake_services/grants/__init__.py b/services/pancake_services/grants/__init__.py index e69de29..2b47ab2 100644 --- a/services/pancake_services/grants/__init__.py +++ b/services/pancake_services/grants/__init__.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. diff --git a/services/pancake_services/grants/app.py b/services/pancake_services/grants/app.py index d71a0c5..37728ef 100644 --- a/services/pancake_services/grants/app.py +++ b/services/pancake_services/grants/app.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """FastAPI application factory for the Pancake grants service.""" from __future__ import annotations diff --git a/services/pancake_services/grants/auth.py b/services/pancake_services/grants/auth.py index 0bc0031..28993aa 100644 --- a/services/pancake_services/grants/auth.py +++ b/services/pancake_services/grants/auth.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Hub-delegated authentication. The AR hub is the trust anchor: users authenticate to the hub and present diff --git a/services/pancake_services/grants/issuer.py b/services/pancake_services/grants/issuer.py index 3ed4506..f4495a3 100644 --- a/services/pancake_services/grants/issuer.py +++ b/services/pancake_services/grants/issuer.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Issuer key management. The instance signing key is an Ed25519 private key supplied via the diff --git a/services/pancake_services/grants/mealstore.py b/services/pancake_services/grants/mealstore.py index 4826194..3031eab 100644 --- a/services/pancake_services/grants/mealstore.py +++ b/services/pancake_services/grants/mealstore.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Persistent, signed MEAL audit ledger. Every consequential event in the grants service (fieldlist created, grant diff --git a/services/pancake_services/grants/merkle.py b/services/pancake_services/grants/merkle.py index cf81d1e..031eb2a 100644 --- a/services/pancake_services/grants/merkle.py +++ b/services/pancake_services/grants/merkle.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Merkle ListID construction per services/specs/MERKLE_LISTID.md. A List's identifier (ListID) is the hex Merkle root over its members diff --git a/services/pancake_services/grants/models.py b/services/pancake_services/grants/models.py index ae10c80..a8e03b7 100644 --- a/services/pancake_services/grants/models.py +++ b/services/pancake_services/grants/models.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ORM models for the grants service. Guardrail reminder: Pancake stores GeoID list membership and grant diff --git a/services/pancake_services/grants/routers/__init__.py b/services/pancake_services/grants/routers/__init__.py index e69de29..2b47ab2 100644 --- a/services/pancake_services/grants/routers/__init__.py +++ b/services/pancake_services/grants/routers/__init__.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. diff --git a/services/pancake_services/grants/routers/audit.py b/services/pancake_services/grants/routers/audit.py index c2439ee..f480798 100644 --- a/services/pancake_services/grants/routers/audit.py +++ b/services/pancake_services/grants/routers/audit.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """OpenScience Auditing API: per-GeoID provenance from the signed MEAL ledger.""" from __future__ import annotations diff --git a/services/pancake_services/grants/routers/bites.py b/services/pancake_services/grants/routers/bites.py index 9d27663..591f3a0 100644 --- a/services/pancake_services/grants/routers/bites.py +++ b/services/pancake_services/grants/routers/bites.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """BITE query API: GeoID-indexed access to ingested vendor data. Weather reads can be consent-gated: when ``require_grant_for_weather`` is set, diff --git a/services/pancake_services/grants/routers/fieldlists.py b/services/pancake_services/grants/routers/fieldlists.py index 2989bc8..1eb6aba 100644 --- a/services/pancake_services/grants/routers/fieldlists.py +++ b/services/pancake_services/grants/routers/fieldlists.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """FieldList endpoints: owner-scoped GeoID lists identified by Merkle ListIDs.""" from __future__ import annotations diff --git a/services/pancake_services/grants/routers/grants.py b/services/pancake_services/grants/routers/grants.py index 01ffa07..84d6b1b 100644 --- a/services/pancake_services/grants/routers/grants.py +++ b/services/pancake_services/grants/routers/grants.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Grant lifecycle endpoints: issue, retrieve, revoke, status list, verify. Delivery model (no OTP): the grantee authenticates to the hub with their diff --git a/services/pancake_services/grants/schemas.py b/services/pancake_services/grants/schemas.py index c76b054..9865800 100644 --- a/services/pancake_services/grants/schemas.py +++ b/services/pancake_services/grants/schemas.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Pydantic request/response schemas for the grants service.""" from __future__ import annotations diff --git a/services/pancake_services/grants/sdjwt.py b/services/pancake_services/grants/sdjwt.py index a383d52..49fc71d 100644 --- a/services/pancake_services/grants/sdjwt.py +++ b/services/pancake_services/grants/sdjwt.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Minimal SD-JWT VC implementation per services/specs/CREDENTIAL_PROFILE.md. Implements the subset of draft-ietf-oauth-sd-jwt-vc that the field-access diff --git a/services/pancake_services/grants/statuslist.py b/services/pancake_services/grants/statuslist.py index e8b248a..47d7619 100644 --- a/services/pancake_services/grants/statuslist.py +++ b/services/pancake_services/grants/statuslist.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """StatusList2021-style revocation bitstring. A compact revocation list: one bit per issued credential, indexed by the diff --git a/services/pancake_services/grants/statuslist_service.py b/services/pancake_services/grants/statuslist_service.py index d5f963b..9230338 100644 --- a/services/pancake_services/grants/statuslist_service.py +++ b/services/pancake_services/grants/statuslist_service.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Persistence and index allocation for the issuer's revocation status list.""" from __future__ import annotations diff --git a/services/pancake_services/grants/testkit/__init__.py b/services/pancake_services/grants/testkit/__init__.py index e69de29..2b47ab2 100644 --- a/services/pancake_services/grants/testkit/__init__.py +++ b/services/pancake_services/grants/testkit/__init__.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. diff --git a/services/pancake_services/grants/testkit/fake_ar2.py b/services/pancake_services/grants/testkit/fake_ar2.py index f5ab21a..4470f81 100644 --- a/services/pancake_services/grants/testkit/fake_ar2.py +++ b/services/pancake_services/grants/testkit/fake_ar2.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + from contextlib import contextmanager from unittest.mock import patch import httpx diff --git a/services/pancake_services/grants/testkit/mint_test_credentials.py b/services/pancake_services/grants/testkit/mint_test_credentials.py index daee2b1..97b389f 100644 --- a/services/pancake_services/grants/testkit/mint_test_credentials.py +++ b/services/pancake_services/grants/testkit/mint_test_credentials.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Mint the five test credentials verifier developers need. Usage: diff --git a/services/pancake_services/store/__init__.py b/services/pancake_services/store/__init__.py index e69de29..2b47ab2 100644 --- a/services/pancake_services/store/__init__.py +++ b/services/pancake_services/store/__init__.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. diff --git a/services/pancake_services/store/bites.py b/services/pancake_services/store/bites.py index 82d54f3..673751c 100644 --- a/services/pancake_services/store/bites.py +++ b/services/pancake_services/store/bites.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """BITE store: persistence and GeoID-indexed querying of BITE envelopes. ``BiteStore.save`` is the production TAP ingest sink (the frozen interface diff --git a/services/pancake_services/tap/__init__.py b/services/pancake_services/tap/__init__.py index e69de29..2b47ab2 100644 --- a/services/pancake_services/tap/__init__.py +++ b/services/pancake_services/tap/__init__.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. diff --git a/services/pancake_services/tap/adapter_base.py b/services/pancake_services/tap/adapter_base.py index 2343c9b..76e465b 100644 --- a/services/pancake_services/tap/adapter_base.py +++ b/services/pancake_services/tap/adapter_base.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Canonical TAP adapter interface (service-grade port of implementation/tap_adapter_base.py). Every vendor adapter implements three steps: diff --git a/services/pancake_services/tap/adapters/__init__.py b/services/pancake_services/tap/adapters/__init__.py index cff7e10..635d2f2 100644 --- a/services/pancake_services/tap/adapters/__init__.py +++ b/services/pancake_services/tap/adapters/__init__.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Concrete TAP vendor adapters (service-grade). Adapters here subclass ``pancake_services.tap.adapter_base.TAPAdapter`` and are diff --git a/services/pancake_services/tap/adapters/seed_weather.py b/services/pancake_services/tap/adapters/seed_weather.py index e5007f8..3e18198 100644 --- a/services/pancake_services/tap/adapters/seed_weather.py +++ b/services/pancake_services/tap/adapters/seed_weather.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Offline seed weather adapter. Writes canned-but-realistic hourly weather BITEs so the DPI demo runs with no diff --git a/services/pancake_services/tap/adapters/terrapipe_weather.py b/services/pancake_services/tap/adapters/terrapipe_weather.py index a6f5e51..4fa55e2 100644 --- a/services/pancake_services/tap/adapters/terrapipe_weather.py +++ b/services/pancake_services/tap/adapters/terrapipe_weather.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """TerraPipe weather TAP adapter. Service-grade port of the legacy ``TerrapipeGFSAdapter`` (implementation/tap_adapters.py), diff --git a/services/pancake_services/tap/adapters/weather_common.py b/services/pancake_services/tap/adapters/weather_common.py index 0375be5..276b78e 100644 --- a/services/pancake_services/tap/adapters/weather_common.py +++ b/services/pancake_services/tap/adapters/weather_common.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Shared helpers for weather TAP adapters. Weather SIRUP body contract (what consumers like agstack-pnd read from a BITE): diff --git a/services/pancake_services/tap/config.py b/services/pancake_services/tap/config.py index 127fd8c..650e1c3 100644 --- a/services/pancake_services/tap/config.py +++ b/services/pancake_services/tap/config.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """TAP vendor configuration loading with ${VAR} environment interpolation. Vendor credentials are never written into config files; the YAML references diff --git a/services/pancake_services/tap/runtime.py b/services/pancake_services/tap/runtime.py index 85801ba..6795b08 100644 --- a/services/pancake_services/tap/runtime.py +++ b/services/pancake_services/tap/runtime.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """TAP runtime: scheduler + executor. The runtime owns retry policy (adapters stay dumb): a task that raises or diff --git a/services/pancake_services/tap/worker.py b/services/pancake_services/tap/worker.py index 459c835..af0bcbc 100644 --- a/services/pancake_services/tap/worker.py +++ b/services/pancake_services/tap/worker.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """TAP worker: wire vendor adapters to the BITE store and run the scheduler. python -m pancake_services.tap.worker --config dpi-demo/tap_vendors.yaml diff --git a/services/tests/conftest.py b/services/tests/conftest.py index cea9f6e..6913fce 100644 --- a/services/tests/conftest.py +++ b/services/tests/conftest.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Shared fixtures: fake hub (RSA JWKS + token minting), in-memory app, clients.""" import base64 import sys diff --git a/services/tests/test_auth.py b/services/tests/test_auth.py index c6f1e0d..5c597f7 100644 --- a/services/tests/test_auth.py +++ b/services/tests/test_auth.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Hub-delegated auth: RS256 JWKS verification, token-type checks, user mirroring.""" diff --git a/services/tests/test_bite_store.py b/services/tests/test_bite_store.py index 4ead157..b2c7db2 100644 --- a/services/tests/test_bite_store.py +++ b/services/tests/test_bite_store.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """BITE store: write-read round trips, dedupe by content hash, query API.""" from datetime import datetime, timezone diff --git a/services/tests/test_bites_grant_gate.py b/services/tests/test_bites_grant_gate.py index 618c8c0..1abe13e 100644 --- a/services/tests/test_bites_grant_gate.py +++ b/services/tests/test_bites_grant_gate.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Grant-gated weather BITE reads (WS1): X-Field-Grant enforcement when enabled.""" import hashlib import json diff --git a/services/tests/test_fieldlists.py b/services/tests/test_fieldlists.py index 6c0822a..e3fca2e 100644 --- a/services/tests/test_fieldlists.py +++ b/services/tests/test_fieldlists.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """FieldList endpoints: idempotent creation, owner scoping, proofs.""" from pancake_services.grants.merkle import merkle_root, verify_inclusion import pytest diff --git a/services/tests/test_grants.py b/services/tests/test_grants.py index 61482b5..a19ec33 100644 --- a/services/tests/test_grants.py +++ b/services/tests/test_grants.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Grant lifecycle: issue -> retrieve -> verify -> revoke -> verify fails.""" import pytest diff --git a/services/tests/test_meal_audit.py b/services/tests/test_meal_audit.py index 2114dea..72579f9 100644 --- a/services/tests/test_meal_audit.py +++ b/services/tests/test_meal_audit.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """MEAL ledger persistence, signatures, chain verification, and the audit API.""" from sqlalchemy import select diff --git a/services/tests/test_merkle.py b/services/tests/test_merkle.py index 817dd2a..a602d30 100644 --- a/services/tests/test_merkle.py +++ b/services/tests/test_merkle.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Known-answer and property tests for the Merkle ListID (MERKLE_LISTID.md).""" import hashlib diff --git a/services/tests/test_sdjwt.py b/services/tests/test_sdjwt.py index 7ec3a67..aa9191e 100644 --- a/services/tests/test_sdjwt.py +++ b/services/tests/test_sdjwt.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Tests for the minimal SD-JWT VC implementation (CREDENTIAL_PROFILE.md).""" import time diff --git a/services/tests/test_statuslist.py b/services/tests/test_statuslist.py index 8fd8241..1cbb430 100644 --- a/services/tests/test_statuslist.py +++ b/services/tests/test_statuslist.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Tests for the StatusList2021-style revocation bitstring.""" import pytest diff --git a/services/tests/test_tap_runtime.py b/services/tests/test_tap_runtime.py index 6abc323..75c2e57 100644 --- a/services/tests/test_tap_runtime.py +++ b/services/tests/test_tap_runtime.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """TAP runtime: scheduling, retry/backoff policy, frozen ingest interface, config interpolation.""" import pytest diff --git a/services/tests/test_tap_weather.py b/services/tests/test_tap_weather.py index 889a267..5823b6d 100644 --- a/services/tests/test_tap_weather.py +++ b/services/tests/test_tap_weather.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Weather TAP adapters: seed generation, TerraPipe transform, worker gating, store round-trip.""" from pancake_services.store.bites import BiteStore from pancake_services.tap.adapter_base import SIRUPType, TAPAdapterFactory diff --git a/services/tests/test_testkit.py b/services/tests/test_testkit.py index e856d3a..a0e8a41 100644 --- a/services/tests/test_testkit.py +++ b/services/tests/test_testkit.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """The five minted test credentials must behave exactly as the manifest promises.""" import json diff --git a/tests/__init__.py b/tests/__init__.py index 78d8de9..0dcffea 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1 +1,5 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Test package""" diff --git a/tests/conftest.py b/tests/conftest.py index 2651ccf..67609fa 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Test Configuration and Fixtures """ diff --git a/tests/functional/test_intake.py b/tests/functional/test_intake.py index be93cf1..e56cb77 100644 --- a/tests/functional/test_intake.py +++ b/tests/functional/test_intake.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Functional Tests - Intake Endpoints """ diff --git a/tests/unit/test_meal_legacy.py b/tests/unit/test_meal_legacy.py index 4925988..8eb4c93 100644 --- a/tests/unit/test_meal_legacy.py +++ b/tests/unit/test_meal_legacy.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """Regression tests for the legacy POC MEAL implementation (implementation/meal.py). Covers findings PC-2026-0001/PC-2026-0004: previous_packet_id linkage and diff --git a/tests/unit/test_packet_utils.py b/tests/unit/test_packet_utils.py index 0359298..32e91b3 100644 --- a/tests/unit/test_packet_utils.py +++ b/tests/unit/test_packet_utils.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: EUPL-1.2 +# Copyright (c) 2026 AgStack project contributors. +# Licensed under the EUPL, Version 1.2; see the LICENSE file for the full text. + """ Unit Tests - Packet Utilities """