Skip to content

Commit 1c5249a

Browse files
committed
Mise à jour des spécifications techniques vers la version 1.2 (équivalence fonctionnelle)
1 parent 9ed96c6 commit 1c5249a

3 files changed

Lines changed: 30 additions & 18 deletions

File tree

docs/contributing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ If you are a developer looking to extend ARK's functionality, please refer to th
1616
For a deeper dive into ARK's internal architecture, review our core specifications:
1717

1818
- **BuildContext Spec**: [docs/dev_docs/ARK_BuildContext_v1.0.md](dev_docs/ARK_BuildContext_v1.0.md)
19-
- **CLI Spec**: [docs/dev_docs/ARK_Cli_v1.1.md](dev_docs/ARK_Cli_v1.1.md)
20-
- **Locking Spec**: [docs/dev_docs/ARK_Locking_v1.1.md](dev_docs/ARK_Locking_v1.1.md)
19+
- **CLI Spec**: [docs/dev_docs/ARK_Cli_v1.2.md](dev_docs/ARK_Cli_v1.2.md)
20+
- **Locking Spec**: [docs/dev_docs/ARK_Locking_v1.2.md](dev_docs/ARK_Locking_v1.2.md)
2121

2222
## **Development Workflow**
2323

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# **ARK CLI Specification v1.1**
1+
# **ARK CLI Specification v1.2**
22

33
This document defines the final, streamlined specification for the ARK Command Line Interface.
44

@@ -11,7 +11,7 @@ The CLI is designed to be simple, predictable, and headless-friendly.
1111
- **Unified Binary**: Use `ark` (or `python pycompiler_ark.py`).
1212
- **Explicit Commands**: No hidden magic; every action requires an explicit command.
1313
- **CLI-First**: All features accessible via GUI are also available via CLI.
14-
- **Predictable**: No dangerous auto-detection; reproducibility through locking.
14+
- **Reproducibility**: Guaranteed via functional locking comparison.
1515

1616
---
1717

@@ -149,6 +149,7 @@ Initializes the current directory as a workspace.
149149
- **Engine Override**: `--engine <id>` uses a temporary engine without modifying `ark.yml`.
150150
- **Reproducible Rebuild**: `--lock [file]` rebuilds strictly from a lock file (default: `.ark/lock/latest.lock.yml`).
151151
- **Git State**: Automatically verifies if the current branch and commit match the lock. Offers automatic checkout on Linux.
152+
- **Integrity Check**: ARK generates a shadow lock from the rebuild environment and performs a **Functional Equivalence** comparison. Detailed diffs are displayed in case of mismatch.
152153
- **Constraint**: `--engine` and `--lock` cannot be used together.
153154

154155
---
@@ -161,4 +162,4 @@ Initializes the current directory as a workspace.
161162
- **CLI4**: Engines and plugins follow a clear `dev > user > core` priority.
162163

163164
---
164-
*End of Specification v1.0*
165+
*End of Specification v1.2*
Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# **ARK Locking Specification v1.1**
1+
# **ARK Locking Specification v1.2**
22

3-
This document defines the architecture and behavior of the build locking mechanism, ensuring reproducibility across environments.
3+
This document defines the architecture and behavior of the build locking mechanism, ensuring functional reproducibility across environments.
44

55
---
66

77
### **1. Purpose of the Lock**
88

99
The lock file is a frozen snapshot of the project's build intent and its execution environment.
10-
It guarantees **Reproducibility**: same lock → same artifact.
10+
It guarantees **Functional Reproducibility**: same technical parameters -> functionally equivalent artifact.
1111

1212
---
1313

@@ -73,12 +73,9 @@ platform:
7373
arch: x86_64 # machine architecture snapshot
7474
python_version: 3.11.9 # exact build interpreter version
7575

76-
dependencies: # Full 'pip freeze' snapshot
76+
dependencies: # Full 'pip list' snapshot
7777
PySide6: 6.7.2
7878
requests: 2.32.3
79-
80-
# workspace_hash: sha256 hash of all included files (respecting excludes)
81-
workspace_hash: sha256:4a5b6c7d8e9f0a1b2c3d...
8279
```
8380
8481
---
@@ -94,19 +91,33 @@ When rebuilding from a lock, ARK performs a "Strict Rebuild":
9491
3. **Verify Environment**: ARK captures the current Python version and environment.
9592
4. **Build**: Passes the locked data directly to the engine via the **BuildContext**.
9693
5. **Shadow Lock Generation**: During the rebuild, ARK generates a *new* lock based on the current live state.
97-
6. **Comparison**: The used lock and the generated shadow lock are compared.
94+
6. **Functional Comparison**: The used lock and the generated shadow lock are compared for **Functional Equivalence**.
9895
- **Identical**: Build successful, environment is consistent.
99-
- **Mismatch**: ARK issues a warning (stored in `.ark/cache/rebuild.lock/`).
96+
- **Mismatch**: ARK issues a warning and displays a detailed **diff** of technical changes (e.g. dependency version mismatch, engine config changes).
97+
98+
---
99+
100+
### **6. Functional Equivalence Criteria**
101+
102+
A build is considered equivalent if the following sections match exactly:
103+
104+
1. **Engine**: name, version, and full configuration (`engine.config`).
105+
2. **Dependencies**: all package versions must match.
106+
3. **Project**: name, version, entry point, and Git commit.
107+
4. **Build**: output path, data mappings, exclusion patterns, and icon.
108+
5. **Platform**: OS, architecture, and Python version.
109+
110+
**Ignored fields**: `build_id`, `git_branch`, `resolved_command`, and other volatile metadata.
100111

101112
---
102113

103-
### **6. Fundamental Rules**
114+
### **7. Fundamental Rules**
104115

105-
- **L1**: No timestamps are included in the hash-critical sections of the lock (reproducibility).
116+
- **L1**: No volatile timestamps are included in the functional sections.
106117
- **L2**: `latest.lock.yml` should be tracked in source control.
107-
- **L3**: The `workspace_hash` ensures the source code itself hasn't changed between builds.
118+
- **L3**: The Git commit hash ensures the source code consistency when using Git.
108119
- **L4**: The engine configuration is completely captured, ensuring identical compiler flags.
109120
- **L5**: The lock is the **sole source of truth** during a `--lock` build.
110121

111122
---
112-
*End of Specification v1.1*
123+
*End of Specification v1.2*

0 commit comments

Comments
 (0)